<template>
  <div id="process">
    <div class="tab">
      <tab :eltabs="this.eltabs" @tabIndex="showTab"></tab>
    </div>
    <div style="overflow: hidden;">
      <!-- 
       class="upload-demo"
       action=""
       :on-preview="handlePreview"
       :on-remove="handleRemove"
       :before-remove="beforeRemove"
       :limit="1"
       :on-exceed="handleExceed"
       accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
       :file-list="fileList"
       style="display: inline-block;margin-left: 0.3rem;float: left;"
       -->
      <el-upload
        v-show="this.activeIdx <= 2"
        action=""
        :auto-upload="false"
        accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
        style="display: inline-block;margin-left: 0.3rem;float: left;"
        :multiple="false"
        :show-file-list="true"
        :on-change="(params) => httpRequest(params,1)"
        
        ref="upload"
        :file-list="filelist"
      >
        <el-button size="medium" type="primary" style="margin-bottom: 0.3rem;">数据导入</el-button>
      </el-upload>
      <div v-show="this.activeIdx > 2">
        <el-upload
          action=""
          :auto-upload="false"
          accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
          style="display: inline-block;margin-left: 0.3rem;float: left;"
          :multiple="false"
          :show-file-list="true"
          :on-change="(params) => httpRequest(params,'gonggui')"
          ref="upload1"
        >
          <el-button size="medium" type="primary"><i class="el-icon-upload"></i>&nbsp;工规</el-button>
        </el-upload>
        <el-upload
          action=""
          :auto-upload="false"
          accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
          style="display: inline-block;margin-left: 0.3rem;float: left;"
          :multiple="false"
          :show-file-list="true"
          :on-change="(params) => httpRequest(params,'gongyidata')"
          ref="upload2"
        >
          <el-button size="medium" type="primary"><i class="el-icon-upload"></i>&nbsp;工艺数据</el-button>
        </el-upload>
      </div>
      
      <el-button size="medium" type="primary" style="display: none;margin-bottom: 0.3rem;margin-left: 0.4rem;">仿真数据</el-button>
      <el-button size="medium" type="primary" @click="clickImg" style="margin-left: 0.3rem;float: left;margin-bottom: 0.1rem;">查看导入样例</el-button>
      <div v-if="showImg1" style="display: block;margin: 0.1rem auto;width: 100%;overflow-x: auto;">
        <img :src="imgSrc1" id="">
      </div>
      <div v-if="showImg2" style="display: block;margin: 0.1rem auto;width: 100%;overflow-x: auto;">
        <h5>Nodes ：</h5>
        <img :src="imgSrc2_1" id="">
        <h5>Edges ：</h5>
        <img :src="imgSrc2_2" id="">
        <h5>All ：</h5>
        <img :src="imgSrc2_3" id="">
      </div>
      <div v-if="showImg34" style="display: block;margin: 0.1rem auto;width: 100%;overflow-x: auto;">
        <h4 class="tit_34">工规样例数据</h4>
        <img :src="imgSrc3" id="">
      </div>
      <div v-if="showImg34" style="display: block;margin: 0.1rem auto;width: 100%;overflow-x: auto;">
        <h4 class="tit_34">工艺数据样例数据</h4>
        <img :src="imgSrc4" id="">
      </div>
    </div>
    <!-- 复杂网络确定按钮 -->
    <!-- <div>
      <el-button :class="this.activeIdx === 2 && this.showthreefilebtn==true ? '_block' : '_none'" type="primary" size="medium" style="margin-left: 0.3rem;" @click="threefile">确定</el-button>
    </div> -->
    <!-- 工艺流程展示 -->
    <div class="techBox" :class="this.activeIdx === 1 ? '_block' : '_none'">
      <div class="infor">
        <el-divider content-position="left">工艺信息</el-divider>
        <!-- <h3><i class="fa fa-tags"></i>&nbsp;工艺信息</h3> -->
        <p>
          <span>您所导入的数据中，包括</span>
          <span><b>5</b>道工序，</span>
          <span><b>65</b>个工艺参数，</span>
          <span><b>15</b>中间检参数，</span>
          <span><b>13</b>终检参数。</span>
        </p>
        <div class="processDemon">
          <div style="margin: 0.3rem 0;">
            <el-radio-group v-model="gxRadio" size="small" @change="stepChange">
              <el-radio border v-for="item of gongxu" :key="item.id" :label="item.id">{{ item.id + '：' + item.name }}</el-radio>
            </el-radio-group>
          </div>
          <show-table :showData="this.gxStep"></show-table>
        </div>
        <div style="margin: 0.2rem 0;">
          <el-divider style="margin-top: 0.3rem;" content-position="left">工艺流程图</el-divider>
          <!-- <h3 style="margin-top: 0.3rem;"><i class="fa fa-tags"></i>&nbsp;工艺流程图</h3> -->
          <div style="margin-top: 0.3rem;padding: 0 0.3rem;">
            <el-radio-group v-model="gongyiRadio" size="small" @change="gyRadio">
              <el-radio border :label="1">全工序流程图</el-radio>
              <el-radio border :label="2">无工步流程图</el-radio>
            </el-radio-group>
          </div>
          <div class="flowChart">
            <h3 style="width: 100%;text-align: center;margin-top: 0.7rem;">制造工艺流程图</h3>
            <div class="sekuai">
              <span><b style="background: #4c86ac;"></b>&nbsp;终检</span>
              <span><b style="background: #3592FF;"></b>&nbsp;中间检</span>
              <span><b style="background: #dda38f;"></b>&nbsp;<b style="background: #aed4c2;"></b>
              &nbsp;<b style="background: #3a5e77;"></b>&nbsp;<b style="background: #ca8622;"></b>&nbsp;
              <b style="background: #109800;"></b>&nbsp;工序</span>
              <span><b style="background: #c23531;"></b>&nbsp;工艺参数</span>
            </div>
            <el-scrollbar v-show="this.gongyiRadio === 1">
              <div class="chartall" style="width: 11rem;">
                <e-charts :optionsData="this.flowData1"></e-charts>
              </div>
            </el-scrollbar>
            <el-scrollbar v-show="this.gongyiRadio === 2">
              <div class="chartall" style="width: 11rem;">
                <e-charts :optionsData="this.flowData2"></e-charts>
              </div>
            </el-scrollbar>
            <h3 style="width: 100%;text-align: center;margin-top: 0.7rem;">中间检联动关系图</h3>
            <div class="sekuai">
              <span><b style="background: #c23531;"></b>&nbsp;型芯制造</span>
              <span><b style="background: #4592FF;"></b>&nbsp;蜡模制造</span>
              <span><b style="background: #109800;"></b>&nbsp;涂料制壳</span>
            </div>
            <e-charts :optionsData="this.flowData3"></e-charts>
          </div>
        </div>
      </div>
    </div>
    <!-- 复杂网络分析 -->
    <div class="networkBox" :class="this.activeIdx === 2 ? '_block' : '_none'">
      <div class="gx">
        <!-- <h3><i class="fa fa-tags"></i>&nbsp;工序信息</h3> -->
        <el-divider content-position="left">工序信息</el-divider>
        <!-- <span v-for="item of gongxu" :key="item.id" :label="item.id">{{ item.id + '：' + item.name }}</span> -->
        <span class="gongxutit" v-if="gongxu_net.length == 0">暂无数据</span>
        <p v-for="item of gongxu_net" :key="item.id" :label="item.id">
          <span class="gongxutit">{{ item.id }}</span>
          <span class="gongxuspan" v-for="(item2, index) of item.name" :key="index">{{ item2 }}</span>
        </p>
      </div>
      <div class="wl" style="margin-top: 0.6rem;">
        <!-- <h3 style="margin-top: 0.2rem;"><i class="fa fa-tags"></i>&nbsp;质量传递网络图</h3> -->
        <el-divider style="margin: 0.6rem;" content-position="left">质量传递网络图</el-divider>
        <!-- <el-radio-group v-model="wangluoRadio" @change="wlRadio" size="small" style="margin-left: 0.3rem;">
          <el-radio border :label="1">全节点</el-radio>
          <el-radio border :label="2">无工步</el-radio>
        </el-radio-group> -->
        
        <!-- <div class="sekuai">
          <span><b style="background: #c23531;"></b>&nbsp;第1道工序</span>
          <span><b style="background: #3592FF;"></b>&nbsp;第2道工序</span>
          <span><b style="background: #3a5e77;"></b>&nbsp;第3道工序</span>
          <span><b style="background: #109800;"></b>&nbsp;第4道工序</span>
          <span><b style="background: #ca8622;"></b>&nbsp;第5道工序</span>
          <span><b style="background: #4c86ac;"></b>&nbsp;终检</span>
        </div> -->
        <div class="tableChart">
          <div class="netchart">
            <span v-if="initpage" class="nodata">暂无数据</span>
            <e-charts :optionsData="this.networkChart"></e-charts>
          </div>
          <div class="linkTable">
            <h3 style="width: 100%;text-align: center;margin-bottom: 0.2rem;">节点连接度</h3>
            <div>
              <data-tables :tableData="linkData" :tableTitle="linkthead" :height="'4.6rem'"></data-tables>
            </div>
          </div>
        </div>
        <!-- <el-divider style="margin-top: 0.3rem;" content-position="left">节点连接度</el-divider> -->
        <!-- <div class="linkTable">
          <h3 style="width: 100%;text-align: center;margin-bottom: 0.2rem;">节点连接度</h3>
          <div>
            <data-tables :tableData="linkData" :tableTitle="linkthead" :height="'4.6rem'"></data-tables>
          </div>
        </div> -->
        <p style="padding: 0 0.3rem;">
          关键节点—— <span v-for="item of keygz" :key="item.id" :label="item.id">{{ item.id + '：' + item.name }}，</span>
        </p>
      </div>
    </div>
    <!-- 关键参数识别、联动作用分析 -->
    <div class="keyParams_linkageEffect" :class="this.activeIdx > 2 ? '_block' : '_none'">
      <tab3-tab4
        :resultName="this.activeIdx === 3 ? this.tab3Resname : this.tab4Resname"
        :radioList="this.activeIdx === 3 ? this.tab3Radio : this.tab4Radio"
        :keyParam="this.activeIdx === 3 ? this.key3Param : this.key4Param"
        :tableThead="this.activeIdx === 3 ? this.tab3Thead : this.tab4Thead"
        :tableBody="this.activeIdx === 3 ? this.table3Data : this.table4Data"
        :idx="this.activeIdx"
        @gxResult="resultFun"
        :barData="this.chart3_1_data"
        :scatterData="this.chart3_2_data"
        :barImg="this.barimg"
        :scatterData2="this.scatterimg"
        :heatMapData="this.heatMapData"
        :firstTit="this.firstTit"
        :isliandongzhijian="this.isliandongzhijian"
        :options1="this.options1"
      >
      </tab3-tab4>
    </div>
  </div>
</template>

<script>
import XLSX from 'xlsx'
// import { Loading } from 'element-ui';
  
import formParams from '../components/form.vue'
import tab from '../components/tab.vue'
import dataTables from '../components/table.vue'
import showTable from '../components/dataShowTable.vue'
import eCharts from '../components/chart.vue'
import tab3Tab4 from '../components/process_tab3_tab4.vue'
import {data1, data2} from '../assets/js/data.js'

import {G3DATA_node, G4DATA_node, G4DATA_link, G3DATA_link} from '../assets/js/G3G4data.js'

export default {
  name: 'process',
  components: {
    formParams,
    tab,
    dataTables,
    showTable,
    eCharts,
    tab3Tab4
  },
  data () {
    return {
      initpage:true,
      showImg1: false,
      showImg2: false,
      showImg34: false,
      imgSrc1: require('./../assets/images/工艺流程展示.png'),
      imgSrc2_1: require('./../assets/images/Nodes.png'),
      imgSrc2_2: require('./../assets/images/Edges.png'),
      imgSrc2_3: require('./../assets/images/All.png'),
      // imgSrc3: require('./../assets/images/关键参数联动作用.png'),
      imgSrc3: require('./../assets/images/工规样例数据.png'),
      imgSrc4: require('./../assets/images/工艺数据样例数据.png'),
      activeIdx: 1,
      firstTit: 'SHAP Value',
      gxRadio: '工序1',
      gongyiRadio: 1,
      step: '',
      type: '',
      eltabs: [
        {id: '1', name: '工艺流程展示'},
        {id: '2', name: '复杂网络分析'},
        {id: '3', name: '关键参数识别'},
        {id: '4', name: '联动作用分析'}
      ],
      gongxu: [
        {id: '工序1', name: '型芯制造'},
        {id: '工序2', name: '蜡模制造'},
        {id: '工序3', name: '涂料制造'},
        {id: '工序4', name: '熔化浇注'},
        {id: '工序5', name: '后工序处理'}
      ],
      gongxu_net: [
        // {id: '工序1：', name: ['型芯制造1', '型芯制造2', '型芯制造3', ]},
        // {id: '工序2：', name: ['蜡模制造1', '蜡模制造2', '蜡模制造3', ]},
        // {id: '工序3：', name: ['涂料制造1', '涂料制造2', '涂料制造3', ]},
        // {id: '工序4：', name: ['熔化浇注1', '熔化浇注2', '熔化浇注3', ]},
        // {id: '工序5：', name: ['后工序处理1', '后工序处理2', '后工序处理3', ]},

        // {id: '工序1',},
        // {id: '工序2',},
        // {id: '工序3',},
        // {id: '工序4',},
        // {id: '工序5',},
      ],
      gxStep: {},
      tableData: {
        '工序1': {
          pp: [
            {label: '搅拌速度', value1: '', value2: '', index1: '1', index2: '工艺参数'},
            {label: 'x_注射压力', value1: '', value2: '', index1: '1', index2: '工艺参数'},
            {label: 'x_保压时间', value1: '', value2: '', index1: '1', index2: '工艺参数'},
            {label: 'x_模板预热温度', value1: '', value2: '', index1: '1', index2: '工艺参数'},
            {label: '浆料缸温度', value1: '', value2: '', index1: '1', index2: '工艺参数'},
            {label: 'x_合模压力', value1: '', value2: '', index1: '1', index2: '工艺参数'},
            {label: 'x_烧结温度', value1: '', value2: '', index1: '1', index2: '工艺参数'},
            {label: 'x_保温时间', value1: '', value2: '', index1: '1', index2: '工艺参数'},
            {label: 'x_升温速度', value1: '', value2: '', index1: '1', index2: '工艺参数'},
            {label: 'x_降温速度', value1: '', value2: '', index1: '1', index2: '工艺参数'},
            {label: '高温强化时间', value1: '', value2: '', index1: '1', index2: '工艺参数'},
            {label: '室温强化时间', value1: '', value2: '', index1: '1', index2: '工艺参数'}
          ],
          sqp: [
            {label: '型芯强度', value1: '', value2: '', index1: '1', index2: '中间检'},
            {label: '型芯收缩率', value1: '', value2: '', index1: '1', index2: '中间检'},
            {label: '型芯尺寸偏差', value1: '', value2: '', index1: '1', index2: '中间检'}
          ],
          scldzj: [
            {label: '无', value1: '', value2: '', index1: '1', index2: '上层联动质检'}
          ],
          yxzj: [
            {label: '型芯裂纹断裂', value1: '', value2: '', index1: '1', index2: '影响终检'},
            {label: '有无型芯缺陷', value1: '', value2: '', index1: '1', index2: '影响终检'},
            {label: '型芯力学性能', value1: '', value2: '', index1: '1', index2: '影响终检'},
            {label: '型芯裂纹断裂', value1: '', value2: '', index1: '1', index2: '影响终检'},
            {label: '型芯力学性能', value1: '', value2: '', index1: '1', index2: '影响终检'}
          ]
        },
        '工序2': {
          pp: [
            {label: '收缩率', value1: '', value2: '', index1: '2', index2: '工艺参数'},
            {label: '软化点', value1: '', value2: '', index1: '2', index2: '工艺参数'},
            {label: '变形率', value1: '', value2: '', index1: '2', index2: '工艺参数'},
            {label: '表面强度', value1: '', value2: '', index1: '2', index2: '工艺参数'},
            {label: '灰分', value1: '', value2: '', index1: '2', index2: '工艺参数'},
            {label: 'l_粘度', value1: '', value2: '', index1: '2', index2: '工艺参数'},
            {label: '化学质量', value1: '', value2: '', index1: '2', index2: '工艺参数'},
            {label: 'l_注射压力', value1: '', value2: '', index1: '2', index2: '工艺参数'},
            {label: 'l_保压时间', value1: '', value2: '', index1: '2', index2: '工艺参数'},
            {label: 'l_模板预热温度', value1: '', value2: '', index1: '2', index2: '工艺参数'},
            {label: '蜡膏温度', value1: '', value2: '', index1: '2', index2: '工艺参数'},
            {label: 'l_环境温度', value1: '', value2: '', index1: '2', index2: '工艺参数'},
            {label: 'l_合模压力', value1: '', value2: '', index1: '2', index2: '工艺参数'}
          ],
          sqp: [
            {label: '蜡模强度', value1: '', value2: '', index1: '2', index2: '中间检'},
            {label: '蜡模尺寸偏差', value1: '', value2: '', index1: '2', index2: '中间检'},
            {label: '蜡模是否完整', value1: '', value2: '', index1: '2', index2: '中间检'}
          ],
          scldzj: [
            {label: '型芯强度', value1: '', value2: '', index1: '1', index2: '上层联动质检'},
            {label: '型芯收缩率', value1: '', value2: '', index1: '1', index2: '上层联动质检'}
          ],
          yxzj: [
            {label: '蜡模是否完整', value1: '', value2: '', index1: '1', index2: '影响终检'},
            {label: '蜡模强度', value1: '', value2: '', index1: '1', index2: '影响终检'},
            {label: '蜡模尺寸偏差', value1: '', value2: '', index1: '1', index2: '影响终检'},
            {label: '蜡模是否完整', value1: '', value2: '', index1: '1', index2: '影响终检'}
          ]
        },
        '工序3': {
          pp: [
            {label: '热膨胀性', value1: '', value2: '', index1: '3', index2: '工艺参数'},
            {label: '化学成分', value1: '', value2: '', index1: '3', index2: '工艺参数'},
            {label: '粒度', value1: '', value2: '', index1: '3', index2: '工艺参数'},
            {label: 't_粘度', value1: '', value2: '', index1: '3', index2: '工艺参数'},
            {label: 't_环境温度', value1: '', value2: '', index1: '3', index2: '工艺参数'},
            {label: '模壳湿度/环境湿度', value1: '', value2: '', index1: '3', index2: '工艺参数'},
            {label: '模壳厚度', value1: '', value2: '', index1: '3', index2: '工艺参数'},
            {label: '升压速度', value1: '', value2: '', index1: '3', index2: '工艺参数'},
            {label: '脱蜡压力', value1: '', value2: '', index1: '3', index2: '工艺参数'},
            {label: '脱蜡温度', value1: '', value2: '', index1: '3', index2: '工艺参数'},
            {label: 't_焙烧温度', value1: '', value2: '', index1: '3', index2: '工艺参数'},
            {label: 't_保温时间', value1: '', value2: '', index1: '3', index2: '工艺参数'},
            {label: 't_升温速度', value1: '', value2: '', index1: '3', index2: '工艺参数'},
            {label: 't_降温速度', value1: '', value2: '', index1: '3', index2: '工艺参数'}
          ],
          sqp: [
            {label: '模壳收缩率', value1: '', value2: '', index1: '3', index2: '中间检'},
            {label: '粘砂缺陷', value1: '', value2: '', index1: '3', index2: '中间检'},
            {label: '夹杂缺陷', value1: '', value2: '', index1: '3', index2: '中间检'},
            {label: '模壳强度', value1: '', value2: '', index1: '3', index2: '中间检'},
            {label: '模壳质量缺陷', value1: '', value2: '', index1: '3', index2: '中间检'},
            {label: '模壳裂纹缺陷', value1: '', value2: '', index1: '3', index2: '中间检'},
            {label: '蜡料残留', value1: '', value2: '', index1: '3', index2: '中间检'},
            {label: '模壳内表面缺陷', value1: '', value2: '', index1: '3', index2: '中间检'},
            {label: '内表面杂质', value1: '', value2: '', index1: '3', index2: '中间检'}
          ],
          scldzj: [
            {label: '蜡模强度', value1: '', value2: '', index1: '1', index2: '上层联动质检'},
            {label: '蜡模尺寸偏差', value1: '', value2: '', index1: '1', index2: '上层联动质检'}
          ],
          yxzj: [
            {label: '无', value1: '', value2: '', index1: '1', index2: '影响终检'}
          ]
        },
        '工序4': {
          pp: [
            {label: '合金成分', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: '耐火材料成分', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: '蜡料成分', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: '精炼温度', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: '精炼时间', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: 'r_真空度', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: '浇注温度', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: '过滤器', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: '浇注速度', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: '拉晶速度', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: '温度梯度', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: '模组加热温度', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: '模组升温速度', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: '金属液静置时间', value1: '', value2: '', index1: '4', index2: '工艺参数'},
            {label: '冷却时间', value1: '', value2: '', index1: '4', index2: '工艺参数'}
          ],
          sqp: [
            {label: '无', value1: '', value2: '', index1: '4', index2: '中间检'}
          ],
          scldzj: [
            {label: '无', value1: '', value2: '', index1: '1', index2: '上层联动质检'}
          ],
          yxzj: [
            {label: '小角度晶界偏差', value1: '', value2: '', index1: '1', index2: '影响终检'},
            {label: '有无叶片夹杂缺陷', value1: '', value2: '', index1: '1', index2: '影响终检'},
            {label: '叶片尺寸精度', value1: '', value2: '', index1: '1', index2: '影响终检'}
          ]
        },
        '工序5': {
          pp: [
            {label: '手工清壳/水力清壳', value1: '', value2: '', index1: '5', index2: '工艺参数'},
            {label: '线切割/砂轮切割', value1: '', value2: '', index1: '5', index2: '工艺参数'},
            {label: '脱芯液成分', value1: '', value2: '', index1: '5', index2: '工艺参数'},
            {label: '脱芯温度', value1: '', value2: '', index1: '5', index2: '工艺参数'},
            {label: '脱芯压力', value1: '', value2: '', index1: '5', index2: '工艺参数'},
            {label: '脱芯时间', value1: '', value2: '', index1: '5', index2: '工艺参数'},
            {label: '打磨时长', value1: '', value2: '', index1: '5', index2: '工艺参数'}
          ],
          sqp: [
            {label: '无', value1: '', value2: '', index1: '4', index2: '中间检'}
          ],
          scldzj: [
            {label: '无', value1: '', value2: '', index1: '1', index2: '上层联动质检'}
          ],
          yxzj: [
            {label: '表面粗糙度', value1: '', value2: '', index1: '1', index2: '影响终检'},
            {label: '有无表面再结晶', value1: '', value2: '', index1: '1', index2: '影响终检'},
            {label: '是否有残芯', value: '', value2: '', index1: '1', index2: '影响终检'}
          ]
        }
      },
      //  全节点连线数据
      FlowChart1: [
        {source: '搅拌速度', sourceLevel:	'1',	target: '型芯材料', targetLevel:	'2'},
        {source: 'x_注射压力', sourceLevel:	'1',	target: '型芯压制', targetLevel:	'2'},
        {source: 'x_保压时间', sourceLevel:	'1',	target: '型芯压制', targetLevel:	'2'},
        {source: 'x_模板预热温度', sourceLevel:	'1',	target: '型芯压制', targetLevel:	'2'},
        {source: '浆料缸温度', sourceLevel:	'1',	target: '型芯压制', targetLevel:	'2'},
        {source: 'x_合模压力', sourceLevel:	'1',	target: '型芯压制', targetLevel:	'2'},
        {source: 'x_烧结温度', sourceLevel:	'1',	target: '型芯焙烧', targetLevel:	'2'},
        {source: 'x_保温时间', sourceLevel:	'1',	target: '型芯焙烧', targetLevel:	'2'},
        {source: 'x_升温速度', sourceLevel:	'1',	target: '型芯焙烧', targetLevel:	'2'},
        {source: 'x_降温速度', sourceLevel:	'1',	target: '型芯焙烧', targetLevel:	'2'},
        {source: '高温强化时间', sourceLevel:	'1',	target: '型芯强化', targetLevel:	'2'},
        {source: '室温强化时间', sourceLevel:	'1',	target: '型芯强化', targetLevel:	'2'},
        {source: '型芯材料', sourceLevel:	'2',	target: '型芯强度', targetLevel:	'3'},
        {source: '型芯压制', sourceLevel:	'2',	target: '型芯强度', targetLevel:	'3'},
        {source: '型芯压制', sourceLevel:	'2',	target: '型芯收缩率', targetLevel:	'3'},
        {source: '型芯压制', sourceLevel:	'2',	target: '型芯尺寸偏差', targetLevel:	'3'},
        {source: '型芯焙烧', sourceLevel:	'2',	target: '型芯强度', targetLevel:	'3'},
        {source: '型芯焙烧', sourceLevel:	'2',	target: '型芯收缩率', targetLevel:	'3'},
        {source: '型芯强化', sourceLevel:	'2',	target: '型芯强度', targetLevel:	'3'},
        {source: '型芯强度', sourceLevel:	'3',	target: '型芯裂纹断裂', targetLevel:	'4'},
        {source: '型芯强度', sourceLevel:	'3',	target: '有无型芯缺陷', targetLevel:	'4'},
        {source: '型芯强度', sourceLevel:	'3',	target: '型芯力学性能', targetLevel:	'4'},
        {source: '型芯收缩率', sourceLevel:	'3',	target: '型芯裂纹断裂', targetLevel:	'4'},
        {source: '型芯收缩率', sourceLevel:	'3',	target: '型芯力学性能', targetLevel:	'4'},
        {source: '型芯尺寸偏差', sourceLevel:	'3',	target: '型芯尺寸', targetLevel:	'4'},
        {source: '型芯材料', sourceLevel:	'2',	target: '型芯压制', targetLevel:	'2'},
        {source: '型芯压制', sourceLevel:	'2',	target: '型芯焙烧', targetLevel:	'2'},
        {source: '型芯焙烧', sourceLevel:	'2',	target: '型芯强化', targetLevel:	'2'},
        {source: '型芯强化', sourceLevel:	'2',	target: '蜡模模料', targetLevel:	'2'},
        {source: '收缩率', sourceLevel:	'1',	target: '蜡模模料', targetLevel:	'2'},
        {source: '软化点', sourceLevel:	'1',	target: '蜡模模料', targetLevel:	'2'},
        {source: '变形率', sourceLevel:	'1',	target: '蜡模模料', targetLevel:	'2'},
        {source: '针入度', sourceLevel: '1', target: '蜡模模料', targetLevel:	'2'},
        {source: '灰分', sourceLevel:	'1',	target: '蜡模模料', targetLevel:	'2'},
        {source: 'l_粘度', sourceLevel:	'1',	target: '蜡模模料', targetLevel:	'2'},
        {source: '密度', sourceLevel: '1', target: '蜡模模料', targetLevel:	'2'},
        {source: 'l_注射压力', sourceLevel:	'1',	target: '蜡模压制', targetLevel:	'2'},
        {source: 'l_保压时间', sourceLevel:	'1',	target: '蜡模压制', targetLevel:	'2'},
        {source: 'l_模板预热温度', sourceLevel:	'1',	target: '蜡模压制', targetLevel:	'2'},
        {source: '蜡膏温度', sourceLevel:	'1',	target: '蜡模压制', targetLevel:	'2'},
        {source: 'l_环境温度', sourceLevel:	'1',	target: '蜡模压制', targetLevel:	'2'},
        {source: 'l_合模压力', sourceLevel:	'1',	target: '蜡模压制', targetLevel:	'2'},
        {source: '蜡模模料', sourceLevel:	'2',	target: '蜡模是否完整', targetLevel:	'3'},
        {source: '蜡模模料', sourceLevel:	'2',	target: '蜡模强度', targetLevel:	'3'},
        {source: '蜡模模料', sourceLevel:	'2',	target: '蜡模尺寸偏差', targetLevel:	'3'},
        {source: '蜡模压制', sourceLevel:	'2',	target: '蜡模强度', targetLevel:	'3'},
        {source: '蜡模压制', sourceLevel:	'2',	target: '蜡模尺寸偏差', targetLevel:	'3'},
        {source: '蜡模是否完整', sourceLevel:	'3',	target: '叶片型面尺寸', targetLevel:	'4'},
        {source: '蜡模是否完整', sourceLevel:	'3',	target: '有无叶片夹杂缺陷', targetLevel:	'4'},
        {source: '蜡模强度', sourceLevel:	'3',	target: '有无叶片裂纹断裂', targetLevel:	'4'},
        {source: '蜡模强度', sourceLevel:	'3',	target: '叶片尺寸精度', targetLevel:	'4'},
        {source: '蜡模尺寸偏差', sourceLevel:	'3',	target: '叶片型面尺寸', targetLevel:	'4'},
        {source: '蜡模尺寸偏差', sourceLevel:	'3',	target: '有无叶片裂纹断裂', targetLevel:	'4'},
        {source: '蜡模尺寸偏差', sourceLevel:	'3',	target: '叶片尺寸精度', targetLevel:	'4'},
        {source: '蜡模尺寸偏差', sourceLevel:	'3',	target: '表面粗糙度', targetLevel:	'4'},
        {source: '蜡模模料', sourceLevel:	'2',	target: '蜡模压制', targetLevel:	'2'},
        {source: '蜡模压制', sourceLevel:	'2',	target: '制壳材料', targetLevel:	'2'},
        {source: '热膨胀性', sourceLevel:	'1',	target: '制壳材料', targetLevel:	'2'},
        {source: '化学成分', sourceLevel:	'1',	target: '制壳材料', targetLevel:	'2'},
        {source: '粒度', sourceLevel:	'1',	target: '制壳材料', targetLevel:	'2'},
        {source: 't_粘度', sourceLevel:	'1',	target: '粘结剂', targetLevel:	'2'},
        {source: 't_环境温度', sourceLevel:	'1',	target: '模壳制备', targetLevel:	'2'},
        {source: '模壳湿度', sourceLevel:	'1',	target: '模壳制备', targetLevel:	'2'},
        {source: '模壳厚度', sourceLevel:	'1',	target: '模壳制备', targetLevel:	'2'},
        {source: '升压速度', sourceLevel:	'1',	target: '脱蜡', targetLevel:	'2'},
        {source: '脱蜡压力', sourceLevel:	'1',	target: '脱蜡', targetLevel:	'2'},
        {source: '脱蜡温度', sourceLevel:	'1',	target: '脱蜡', targetLevel:	'2'},
        {source: 't_焙烧温度', sourceLevel:	'1',	target: '模壳焙烧', targetLevel:	'2'},
        {source: 't_保温时间', sourceLevel:	'1',	target: '模壳焙烧', targetLevel:	'2'},
        {source: 't_升温速度', sourceLevel:	'1',	target: '模壳焙烧', targetLevel:	'2'},
        {source: 't_降温速度', sourceLevel:	'1',	target: '模壳焙烧', targetLevel:	'2'},
        {source: '制壳材料', sourceLevel:	'2',	target: '模壳收缩率', targetLevel:	'3'},
        {source: '制壳材料', sourceLevel:	'2',	target: '粘砂缺陷', targetLevel:	'3'},
        {source: '制壳材料', sourceLevel:	'2',	target: '夹杂缺陷', targetLevel:	'3'},
        {source: '制壳材料', sourceLevel:	'2',	target: '模壳强度', targetLevel:	'3'},
        {source: '粘结剂', sourceLevel:	'2',	target: '模壳质量缺陷', targetLevel:	'3'},
        {source: '模壳制备', sourceLevel:	'2',	target: '模壳裂纹缺陷', targetLevel:	'3'},
        {source: '脱蜡', sourceLevel:	'2',	target: '模壳强度', targetLevel:	'3'},
        {source: '脱蜡', sourceLevel:	'2',	target: '蜡料残留', targetLevel:	'3'},
        {source: '模壳焙烧', sourceLevel:	'2',	target: '模壳强度', targetLevel:	'3'},
        {source: '模壳焙烧', sourceLevel:	'2',	target: '模壳内表面缺陷', targetLevel:	'3'},
        {source: '模组清洗', sourceLevel:	'2',	target: '内表面杂质', targetLevel:	'3'},
        {source: '模壳收缩率', sourceLevel:	'3',	target: '叶片尺寸精度', targetLevel:	'4'},
        {source: '粘砂缺陷', sourceLevel:	'3',	target: '有无表面再结晶', targetLevel:	'4'},
        {source: '夹杂缺陷', sourceLevel:	'3',	target: '叶片尺寸精度', targetLevel:	'4'},
        {source: '模壳强度', sourceLevel:	'3',	target: '有无叶片裂纹断裂', targetLevel:	'4'},
        {source: '模壳强度', sourceLevel:	'3',	target: '叶片尺寸精度', targetLevel:	'4'},
        {source: '模壳强度', sourceLevel:	'3',	target: '表面粗糙度', targetLevel:	'4'},
        {source: '模壳质量缺陷', sourceLevel:	'3',	target: '叶片尺寸精度', targetLevel:	'4'},
        {source: '模壳质量缺陷', sourceLevel:	'3',	target: '有无叶片表面缺陷', targetLevel:	'4'},
        {source: '模壳裂纹缺陷', sourceLevel:	'3',	target: '叶片尺寸精度', targetLevel:	'4'},
        {source: '蜡料残留', sourceLevel:	'3',	target: '有无叶片夹杂缺陷', targetLevel:	'4'},
        {source: '模壳内表面缺陷', sourceLevel:	'3',	target: '表面粗糙度', targetLevel:	'4'},
        {source: '内表面杂质', sourceLevel:	'3',	target: '有无叶片夹杂缺陷', targetLevel:	'4'},
        {source: '制壳材料', sourceLevel:	'2',	target: '粘结剂', targetLevel:	'2'},
        {source: '粘结剂', sourceLevel:	'2',	target: '模壳制备', targetLevel:	'2'},
        {source: '模壳制备', sourceLevel:	'2',	target: '脱蜡', targetLevel:	'2'},
        {source: '脱蜡', sourceLevel:	'2',	target: '模壳焙烧', targetLevel:	'2'},
        {source: '模壳焙烧', sourceLevel:	'2',	target: '模组清洗', targetLevel:	'2'},
        {source: '模组清洗', sourceLevel:	'2',	target: '浇注材料', targetLevel:	'2'},
        {source: '合金成分', sourceLevel:	'1',	target: '浇注材料', targetLevel:	'2'},
        {source: '耐火材料成分', sourceLevel:	'1',	target: '浇注材料', targetLevel:	'2'},
        {source: '蜡料成分', sourceLevel:	'1',	target: '浇注材料', targetLevel:	'2'},
        {source: '精炼温度', sourceLevel:	'1',	target: '熔炼浇注', targetLevel:	'2'},
        {source: '精炼时间', sourceLevel:	'1',	target: '熔炼浇注', targetLevel:	'2'},
        {source: 'r_真空度', sourceLevel:	'1',	target: '熔炼浇注', targetLevel:	'2'},
        {source: '浇注温度', sourceLevel:	'1',	target: '熔炼浇注', targetLevel:	'2'},
        {source: '过滤器', sourceLevel:	'1',	target: '熔炼浇注', targetLevel:	'2'},
        {source: '浇注速度', sourceLevel:	'1',	target: '熔炼浇注', targetLevel:	'2'},
        {source: '拉晶速度', sourceLevel:	'1',	target: '结晶', targetLevel:	'2'},
        {source: '温度梯度', sourceLevel:	'1',	target: '结晶', targetLevel:	'2'},
        {source: '模组加热温度', sourceLevel:	'1',	target: '结晶', targetLevel:	'2'},
        {source: '模组升温速度', sourceLevel:	'1',	target: '结晶', targetLevel:	'2'},
        {source: '金属液静置时间', sourceLevel:	'1',	target: '结晶', targetLevel:	'2'},
        {source: '冷却时间', sourceLevel:	'1',	target: '结晶', targetLevel:	'2'},
        {source: '浇注材料', sourceLevel:	'2',	target: '小角度晶界偏差', targetLevel:	'4'},
        {source: '浇注材料', sourceLevel:	'2',	target: '有无叶片夹杂缺陷', targetLevel:	'4'},
        {source: '熔炼浇注', sourceLevel:	'2',	target: '小角度晶界偏差', targetLevel:	'4'},
        {source: '熔炼浇注', sourceLevel:	'2',	target: '有无叶片夹杂缺陷', targetLevel:	'4'},
        {source: '结晶', sourceLevel:	'2',	target: '小角度晶界偏差', targetLevel:	'4'},
        {source: '结晶', sourceLevel:	'2',	target: '有无叶片夹杂缺陷', targetLevel:	'4'},
        {source: '结晶', sourceLevel:	'2',	target: '叶片尺寸精度', targetLevel:	'4'},
        {source: '浇注材料', sourceLevel:	'2',	target: '熔炼浇注', targetLevel:	'2'},
        {source: '熔炼浇注', sourceLevel:	'2',	target: '结晶', targetLevel:	'2'},
        {source: '结晶', sourceLevel:	'2',	target: '清壳切割', targetLevel:	'2'},
        {source: '手工清壳/水力清壳', sourceLevel: '1',	target: '清壳切割', targetLevel:	'2'},
        {source: '线切割/砂轮切割', sourceLevel: '1',	target: '清壳切割', targetLevel:	'2'},
        {source: '脱芯液成分', sourceLevel:	'1',	target: '脱芯', targetLevel:	'2'},
        {source: '脱芯温度', sourceLevel:	'1',	target: '脱芯', targetLevel:	'2'},
        {source: '脱芯压力', sourceLevel:	'1',	target: '脱芯', targetLevel:	'2'},
        {source: '脱芯时间', sourceLevel:	'1',	target: '脱芯', targetLevel:	'2'},
        {source: '打磨时长', sourceLevel:	'1',	target: '吹砂打磨', targetLevel:	'2'},
        {source: '热处理温度', sourceLevel:	'1',	target: '热处理', targetLevel:	'2'},
        {source: 'h_升温速度', sourceLevel:	'1',	target: '热处理', targetLevel:	'2'},
        {source: 'h_降温速度', sourceLevel:	'1',	target: '热处理', targetLevel:	'2'},
        {source: '气淬压力', sourceLevel:	'1',	target: '热处理', targetLevel:	'2'},
        {source: 'h_真空度', sourceLevel:	'1',	target: '热处理', targetLevel:	'2'},
        {source: '清壳切割', sourceLevel:	'2',	target: '表面粗糙度', targetLevel:	'4'},
        {source: '清壳切割', sourceLevel:	'2',	target: '有无表面再结晶', targetLevel:	'4'},
        {source: '脱芯', sourceLevel:	'2',	target: '是否有残芯', targetLevel:	'4'},
        {source: '吹砂打磨', sourceLevel:	'2',	target: '有无表面再结晶', targetLevel:	'4'},
        {source: '热处理', sourceLevel:	'2',	target: '小角度晶界偏差', targetLevel:	'4'},
        {source: '热处理', sourceLevel:	'2',	target: '叶片尺寸精度', targetLevel:	'4'},
        {source: '热处理', sourceLevel:	'2',	target: '表面粗糙度', targetLevel:	'4'},
        {source: '清壳切割', sourceLevel:	'2',	target: '脱芯', targetLevel:	'2'},
        {source: '脱芯', sourceLevel:	'2',	target: '吹砂打磨', targetLevel:	'2'},
        {source: '吹砂打磨', sourceLevel:	'2',	target: '热处理', targetLevel:	'2'}
      ],
      //  3步连线数据
      FlowChart2: [
        {'source': '搅拌速度', 'sourceLevel': '1', 'target': '型芯强度', 'targetLevel': '3'},
        {'source': 'x_注射压力', 'sourceLevel': '1', 'target': '型芯强度', 'targetLevel': '3'},
        {'source': 'x_保压时间', 'sourceLevel': '1', 'target': '型芯收缩率', 'targetLevel': '3'},
        {'source': 'x_模板预热温度', 'sourceLevel': '1', 'target': '型芯强度', 'targetLevel': '3'},
        {'source': '浆料缸温度', 'sourceLevel': '1', 'target': '型芯强度', 'targetLevel': '3'},
        {'source': 'x_合模压力', 'sourceLevel': '1', 'target': '型芯尺寸偏差', 'targetLevel': '3'},
        {'source': 'x_烧结温度', 'sourceLevel': '1', 'target': '型芯收缩率', 'targetLevel': '3'},
        {'source': 'x_保温时间', 'sourceLevel': '1', 'target': '型芯强度', 'targetLevel': '3'},
        {'source': 'x_升温速度', 'sourceLevel': '1', 'target': '型芯强度', 'targetLevel': '3'},
        {'source': 'x_降温速度', 'sourceLevel': '1', 'target': '型芯强度', 'targetLevel': '3'},
        {'source': '高温强化时间', 'sourceLevel': '1', 'target': '型芯强度', 'targetLevel': '3'},
        {'source': '室温强化时间', 'sourceLevel': '1', 'target': '型芯强度', 'targetLevel': '3'},
        {'source': '型芯强度', 'sourceLevel': '3', 'target': '型芯裂纹断裂', 'targetLevel': '4'},
        {'source': '型芯强度', 'sourceLevel': '3', 'target': '有无型芯缺陷', 'targetLevel': '4'},
        {'source': '型芯强度', 'sourceLevel': '3', 'target': '型芯力学性能', 'targetLevel': '4'},
        {'source': '型芯收缩率', 'sourceLevel': '3', 'target': '型芯裂纹断裂', 'targetLevel': '4'},
        {'source': '型芯收缩率', 'sourceLevel': '3', 'target': '型芯力学性能', 'targetLevel': '4'},
        {'source': '型芯尺寸偏差', 'sourceLevel': '3', 'target': '型芯尺寸', 'targetLevel': '4'},
        {'source': '收缩率', 'sourceLevel': '1', 'target': '蜡模尺寸偏差', 'targetLevel': '3'},
        {'source': '软化点', 'sourceLevel': '1', 'target': '蜡模尺寸偏差', 'targetLevel': '3'},
        {'source': '变形率', 'sourceLevel': '1', 'target': '蜡模尺寸偏差', 'targetLevel': '3'},
        {'source': '针入度', 'sourceLevel': '1', 'target': '蜡模尺寸偏差', 'targetLevel': '3'},
        {'source': '灰分', 'sourceLevel': '1', 'target': '蜡模是否完整', 'targetLevel': '3'},
        {'source': 'l_粘度', 'sourceLevel': '1', 'target': '蜡模是否完整', 'targetLevel': '3'},
        {'source': '密度', 'sourceLevel': '1', 'target': '蜡模强度', 'targetLevel': '3'},
        {'source': '密度', 'sourceLevel': '1', 'target': '蜡模尺寸偏差', 'targetLevel': '3'},
        {'source': 'l_注射压力', 'sourceLevel': '1', 'target': '蜡模强度', 'targetLevel': '3'},
        {'source': 'l_保压时间', 'sourceLevel': '1', 'target': '蜡模尺寸偏差', 'targetLevel': '3'},
        {'source': 'l_模板预热温度', 'sourceLevel': '1', 'target': '蜡模强度', 'targetLevel': '3'},
        {'source': '蜡膏温度', 'sourceLevel': '1', 'target': '蜡模尺寸偏差', 'targetLevel': '3'},
        {'source': 'l_环境温度', 'sourceLevel': '1', 'target': '蜡模尺寸偏差', 'targetLevel': '3'},
        {'source': 'l_合模压力', 'sourceLevel': '1', 'target': '蜡模尺寸偏差', 'targetLevel': '3'},
        {'source': '蜡模是否完整', 'sourceLevel': '3', 'target': '叶片型面尺寸', 'targetLevel': '4'},
        {'source': '蜡模是否完整', 'sourceLevel': '3', 'target': '有无叶片夹杂缺陷', 'targetLevel': '4'},
        {'source': '蜡模强度', 'sourceLevel': '3', 'target': '有无叶片裂纹断裂', 'targetLevel': '4'},
        {'source': '蜡模强度', 'sourceLevel': '3', 'target': '叶片尺寸精度', 'targetLevel': '4'},
        {'source': '蜡模尺寸偏差', 'sourceLevel': '3', 'target': '叶片型面尺寸', 'targetLevel': '4'},
        {'source': '蜡模尺寸偏差', 'sourceLevel': '3', 'target': '有无叶片裂纹断裂', 'targetLevel': '4'},
        {'source': '蜡模尺寸偏差', 'sourceLevel': '3', 'target': '叶片尺寸精度', 'targetLevel': '4'},
        {'source': '蜡模尺寸偏差', 'sourceLevel': '3', 'target': '表面粗糙度', 'targetLevel': '4'},
        {'source': '热膨胀性', 'sourceLevel': '1', 'target': '模壳收缩率', 'targetLevel': '3'},
        {'source': '化学成分', 'sourceLevel': '1', 'target': '粘砂缺陷', 'targetLevel': '3'},
        {'source': '化学成分', 'sourceLevel': '1', 'target': '夹杂缺陷', 'targetLevel': '3'},
        {'source': '粒度', 'sourceLevel': '1', 'target': '模壳强度', 'targetLevel': '3'},
        {'source': 't_粘度', 'sourceLevel': '1', 'target': '模壳质量缺陷', 'targetLevel': '3'},
        {'source': 't_环境温度', 'sourceLevel': '1', 'target': '模壳强度', 'targetLevel': '3'},
        {'source': '模壳湿度', 'sourceLevel': '1', 'target': '模壳裂纹缺陷', 'targetLevel': '3'},
        {'source': '模壳厚度', 'sourceLevel': '1', 'target': '模壳裂纹缺陷', 'targetLevel': '3'},
        {'source': '升压速度', 'sourceLevel': '1', 'target': '模壳强度', 'targetLevel': '3'},
        {'source': '脱蜡压力', 'sourceLevel': '1', 'target': '模壳强度', 'targetLevel': '3'},
        {'source': '脱蜡温度', 'sourceLevel': '1', 'target': '蜡料残留', 'targetLevel': '3'},
        {'source': 't_焙烧温度', 'sourceLevel': '1', 'target': '模壳强度', 'targetLevel': '3'},
        {'source': 't_保温时间', 'sourceLevel': '1', 'target': '模壳强度', 'targetLevel': '3'},
        {'source': 't_升温速度', 'sourceLevel': '1', 'target': '模壳内表面缺陷', 'targetLevel': '3'},
        {'source': 't_降温速度', 'sourceLevel': '1', 'target': '模壳强度', 'targetLevel': '3'},
        {'source': '模壳收缩率', 'sourceLevel': '3', 'target': '叶片尺寸精度', 'targetLevel': '4'},
        {'source': '粘砂缺陷', 'sourceLevel': '3', 'target': '有无表面再结晶', 'targetLevel': '4'},
        {'source': '夹杂缺陷', 'sourceLevel': '3', 'target': '叶片尺寸精度', 'targetLevel': '4'},
        {'source': '模壳强度', 'sourceLevel': '3', 'target': '有无叶片裂纹断裂', 'targetLevel': '4'},
        {'source': '模壳强度', 'sourceLevel': '3', 'target': '叶片尺寸精度', 'targetLevel': '4'},
        {'source': '模壳强度', 'sourceLevel': '3', 'target': '表面粗糙度', 'targetLevel': '4'},
        {'source': '模壳质量缺陷', 'sourceLevel': '3', 'target': '叶片尺寸精度', 'targetLevel': '4'},
        {'source': '模壳质量缺陷', 'sourceLevel': '3', 'target': '有无叶片表面缺陷', 'targetLevel': '4'},
        {'source': '模壳裂纹缺陷', 'sourceLevel': '3', 'target': '叶片尺寸精度', 'targetLevel': '4'},
        {'source': '蜡料残留', 'sourceLevel': '3', 'target': '有无叶片夹杂缺陷', 'targetLevel': '4'},
        {'source': '模壳内表面缺陷', 'sourceLevel': '3', 'target': '表面粗糙度', 'targetLevel': '4'},
        {'source': '内表面杂质', 'sourceLevel': '3', 'target': '有无叶片夹杂缺陷', 'targetLevel': '4'},
        {'source': '合金成分', 'sourceLevel': '1', 'target': '小角度晶界偏差', 'targetLevel': '4'},
        {'source': '耐火材料成分', 'sourceLevel': '1', 'target': '小角度晶界偏差', 'targetLevel': '4'},
        {'source': '蜡料成分', 'sourceLevel': '1', 'target': '有无叶片夹杂缺陷', 'targetLevel': '4'},
        {'source': '精炼温度', 'sourceLevel': '1', 'target': '小角度晶界偏差', 'targetLevel': '4'},
        {'source': '精炼时间', 'sourceLevel': '1', 'target': '小角度晶界偏差', 'targetLevel': '4'},
        {'source': 'r_真空度', 'sourceLevel': '1', 'target': '有无叶片夹杂缺陷', 'targetLevel': '4'},
        {'source': '浇注温度', 'sourceLevel': '1', 'target': '小角度晶界偏差', 'targetLevel': '4'},
        {'source': '过滤器', 'sourceLevel': '1', 'target': '有无叶片夹杂缺陷', 'targetLevel': '4'},
        {'source': '浇注速度', 'sourceLevel': '1', 'target': '有无叶片夹杂缺陷', 'targetLevel': '4'},
        {'source': '拉晶速度', 'sourceLevel': '1', 'target': '小角度晶界偏差', 'targetLevel': '4'},
        {'source': '温度梯度', 'sourceLevel': '1', 'target': '小角度晶界偏差', 'targetLevel': '4'},
        {'source': '模组加热温度', 'sourceLevel': '1', 'target': '叶片尺寸精度', 'targetLevel': '4'},
        {'source': '模组升温速度', 'sourceLevel': '1', 'target': '叶片尺寸精度', 'targetLevel': '4'},
        {'source': '金属液静置时间', 'sourceLevel': '1', 'target': '有无叶片夹杂缺陷', 'targetLevel': '4'},
        {'source': '冷却时间', 'sourceLevel': '1', 'target': '叶片尺寸精度', 'targetLevel': '4'},
        {'source': '冷却时间', 'sourceLevel': '1', 'target': '小角度晶界偏差', 'targetLevel': '4'},
        {'source': '手工清壳/水力清壳', 'sourceLevel': '1', 'target': '表面粗糙度', 'targetLevel': '4'},
        {'source': '线切割/砂轮切割', 'sourceLevel': '1', 'target': '表面粗糙度', 'targetLevel': '4'},
        {'source': '线切割/砂轮切割', 'sourceLevel': '1', 'target': '有无表面再结晶', 'targetLevel': '4'},
        {'source': '脱芯液成分', 'sourceLevel': '1', 'target': '是否有残芯', 'targetLevel': '4'},
        {'source': '脱芯温度', 'sourceLevel': '1', 'target': '是否有残芯', 'targetLevel': '4'},
        {'source': '脱芯压力', 'sourceLevel': '1', 'target': '是否有残芯', 'targetLevel': '4'},
        {'source': '脱芯时间', 'sourceLevel': '1', 'target': '是否有残芯', 'targetLevel': '4'},
        {'source': '打磨时长', 'sourceLevel': '1', 'target': '有无表面再结晶', 'targetLevel': '4'},
        {'source': '热处理温度', 'sourceLevel': '1', 'target': '小角度晶界偏差', 'targetLevel': '4'},
        {'source': 'h_升温速度', 'sourceLevel': '1', 'target': '小角度晶界偏差', 'targetLevel': '4'},
        {'source': 'h_降温速度', 'sourceLevel': '1', 'target': '小角度晶界偏差', 'targetLevel': '4'},
        {'source': '气淬压力', 'sourceLevel': '1', 'target': '小角度晶界偏差', 'targetLevel': '4'},
        {'source': '气淬压力', 'sourceLevel': '1', 'target': '叶片尺寸精度', 'targetLevel': '4'},
        {'source': 'h_真空度', 'sourceLevel': '1', 'target': '表面粗糙度', 'targetLevel': '4'},
        {'source': '型芯强度', 'sourceLevel': '3', 'target': '蜡模是否完整', 'targetLevel': '3'},
        {'source': '型芯强度', 'sourceLevel': '3', 'target': '蜡模强度', 'targetLevel': '3'},
        {'source': '型芯强度', 'sourceLevel': '3', 'target': '蜡模尺寸偏差', 'targetLevel': '3'},
        {'source': '型芯收缩率', 'sourceLevel': '3', 'target': '蜡模是否完整', 'targetLevel': '3'},
        {'source': '型芯收缩率', 'sourceLevel': '3', 'target': '蜡模强度', 'targetLevel': '3'},
        {'source': '型芯收缩率', 'sourceLevel': '3', 'target': '蜡模尺寸偏差', 'targetLevel': '3'},
        {'source': '蜡模强度', 'sourceLevel': '3', 'target': '模壳收缩率', 'targetLevel': '3'},
        {'source': '蜡模强度', 'sourceLevel': '3', 'target': '夹杂缺陷', 'targetLevel': '3'},
        {'source': '蜡模强度', 'sourceLevel': '3', 'target': '模壳强度', 'targetLevel': '3'},
        {'source': '蜡模强度', 'sourceLevel': '3', 'target': '模壳质量缺陷', 'targetLevel': '3'},
        {'source': '蜡模强度', 'sourceLevel': '3', 'target': '模壳裂纹缺陷', 'targetLevel': '3'}
      ],
      //  固定的中间检
      FlowChart3: [
        {source: '型芯强度', sourceLevel: '1', target:	'蜡模是否完整', targetLevel: '2'},
        {source: '型芯强度', sourceLevel: '1', target:	'蜡模强度', targetLevel: '2'},
        {source: '型芯强度', sourceLevel: '1', target:	'蜡模尺寸偏差', targetLevel: '2'},
        {source: '型芯收缩率', sourceLevel: '1', target:	'蜡模是否完整', targetLevel: '2'},
        {source: '型芯收缩率', sourceLevel: '1', target:	'蜡模强度', targetLevel: '2'},
        {source: '型芯收缩率', sourceLevel: '1', target:	'蜡模尺寸偏差', targetLevel: '2'},
        {source: '蜡模强度', sourceLevel: '2', target:	'模壳收缩率', targetLevel: '3'},
        {source: '蜡模强度', sourceLevel: '2', target:	'夹杂缺陷', targetLevel: '3'},
        {source: '蜡模强度', sourceLevel: '2', target:	'模壳强度', targetLevel: '3'},
        {source: '蜡模强度', sourceLevel: '2', target:	'模壳质量缺陷', targetLevel: '3'},
        {source: '蜡模强度', sourceLevel: '2', target:	'模壳裂纹缺陷', targetLevel: '3'},
        {source: '蜡模尺寸偏差', sourceLevel: '2', target:	'模壳收缩率', targetLevel: '3'},
        {source: '蜡模尺寸偏差', sourceLevel: '2', target:	'夹杂缺陷', targetLevel: '3'},
        {source: '蜡模尺寸偏差', sourceLevel: '2', target:	'模壳强度', targetLevel: '3'},
        {source: '蜡模尺寸偏差', sourceLevel: '2', target:	'模壳质量缺陷', targetLevel: '3'},
        {source: '蜡模尺寸偏差', sourceLevel: '2', target:	'模壳裂纹缺陷', targetLevel: '3'}
      ],
      //  全节点图
      flowData1: {
        tooltip: {
          formatter: function(param){
            // console.log(param)
            if(param.dataType =='node'){
              return param.marker+param.name
            }else if(param.dataType =='edge'){
              return param.name
            }
          }
        },
        animationDuration: 3000,
        animationEasingUpdate: 'quinticInOut',
        series: [{
          type: 'graph',
          layout: 'none',
          force: {
            // repulsion: 1000
          },
          legendHoverLink: true,
          left: '50',
          top: '40',
          // 建头
          edgeSymbol: ['circle', 'arrow'],
          edgeSymbolSize: [2, 10],
          edgeLabel: {
            show: false,
            normal: {
              show: false,
              position: 'middle',
              textStyle: {
                fontSize: 12
              },
              formatter: '{c}'
            },
          },
          itemStyle: {
            shadowColor: 'rgba(0, 0, 0, 0.5)',
            shadowBlur: 10
          },
          data: [],
          links: [
            // {
            //   source: '深圳创维数字技术有限公司-TEST-03260004',
            //   value: '融资日期:2018-03-26',
            //   target: '测试供应商1227-10000857'
            // },
          ],
          focusNodeAdjacency: true,
          roam: true,
          // 圆形上面的文字
          label: {
            normal: {
              position: 'inside',
              show: true,
              textStyle: {
                fontSize: 12
              }
            }
          },
          lineStyle: {
            normal: {
              opacity: 0.9,
              width: 2,
              curveness: 0,
              color: 'rgba(16, 14, 14, 0.37)'
            }
          }
        }]
      },
      //  3步连线节点图
      flowData2: {
        tooltip: {},
        animationDuration: 3000,
        animationEasingUpdate: 'quinticInOut',
        series: [{
          type: 'graph',
          layout: 'none',
          force: {
            // repulsion: 1000
          },
          legendHoverLink: true,
          left: '120',
          // 建头
          edgeSymbol: ['circle', 'arrow'],
          edgeSymbolSize: [2, 10],
          edgeLabel: {
            show: false,
            normal: {
              show: false,
              position: 'middle',
              textStyle: {
                fontSize: 12
              },
              formatter: '{c}'
            }
          },
          itemStyle: {
            shadowColor: 'rgba(0, 0, 0, 0.5)',
            shadowBlur: 10
          },
          data: [],
          links: [
            // {
            //   source: '深圳创维数字技术有限公司-TEST-03260004',
            //   value: '融资日期:2018-03-26',
            //   target: '测试供应商1227-10000857'
            // },
          ],
          focusNodeAdjacency: true,
          roam: true,
          // 圆形上面的文字
          label: {
            normal: {
              position: 'inside',
              show: true,
              textStyle: {
                fontSize: 12
              }
            }
          },
          lineStyle: {
            normal: {
              opacity: 0.9,
              width: 2,
              curveness: 0,
              color: 'rgba(16, 14, 14, 0.37)'
            }
          }
        }]
      },
      //  固定的中间检节点图
      flowData3: {
        tooltip: {},
        animationDuration: 3000,
        animationEasingUpdate: 'quinticInOut',
        series: [{
          type: 'graph',
          layout: 'none',
          force: {
            // repulsion: 1000
          },
          legendHoverLink: true,
          // 建头
          edgeSymbol: ['circle', 'arrow'],
          edgeSymbolSize: [2, 10],
          edgeLabel: {
            show: false,
            normal: {
              show: false,
              position: 'middle',
              textStyle: {
                fontSize: 12
              },
              formatter: '{c}'
            }
          },
          itemStyle: {
            shadowColor: 'rgba(0, 0, 0, 0.5)',
            shadowBlur: 10
          },
          data: [],
          links: [
            // {
            //   source: '深圳创维数字技术有限公司-TEST-03260004',
            //   value: '融资日期:2018-03-26',
            //   target: '测试供应商1227-10000857'
            // },
          ],
          focusNodeAdjacency: true,
          roam: true,
          // 圆形上面的文字
          label: {
            normal: {
              position: 'inside',
              show: true,
              textStyle: {
                fontSize: 12
              }
            }
          },
          lineStyle: {
            normal: {
              opacity: 0.9,
              width: 2,
              curveness: 0,
              color: 'rgba(16, 14, 14, 0.37)'
            }
          }
        }]
      },
      wangluoRadio: 1,
      //  前3名
      keygz: [],
      linkchartCorrespond: {
        '搅拌速度': '#c23531',
        'x_注射压力': '#c23531',
        'x_保压时间': '#c23531',
        'x_模板预热温度': '#c23531',
        '浆料缸温度': '#c23531',
        'x_合模压力': '#c23531',
        'x_烧结温度': '#c23531',
        'x_保温时间': '#c23531',
        'x_升温速度': '#c23531',
        'x_降温速度': '#c23531',
        '高温强化时间': '#c23531',
        '室温强化时间': '#c23531',
        '收缩率': '#3592FF',
        '软化点': '#3592FF',
        '变形率': '#3592FF',
        '针入度': '#3592FF',
        '灰分': '#3592FF',
        'l_粘度': '#3592FF',
        '密度': '#3592FF',
        'l_注射压力': '#3592FF',
        'l_保压时间': '#3592FF',
        'l_模板预热温度': '#3592FF',
        '蜡膏温度': '#3592FF',
        'l_环境温度': '#3592FF',
        'l_合模压力': '#3592FF',
        '热膨胀性': '#3a5e77',
        '化学成分': '#3a5e77',
        '粒度': '#3a5e77',
        't_粘度': '#3a5e77',
        't_环境温度': '#3a5e77',
        '模壳湿度': '#3a5e77',
        '模壳厚度': '#3a5e77',
        '升压速度': '#3a5e77',
        '脱蜡压力': '#3a5e77',
        '脱蜡温度': '#3a5e77',
        't_焙烧温度': '#3a5e77',
        't_保温时间': '#3a5e77',
        't_升温速度': '#3a5e77',
        't_降温速度': '#3a5e77',
        '合金成分': '#109800',
        '耐火材料成分': '#109800',
        '蜡料成分': '#109800',
        '精炼温度': '#109800',
        '精炼时间': '#109800',
        'r_真空度': '#109800',
        '浇注温度': '#109800',
        '过滤器': '#109800',
        '浇注速度': '#109800',
        '拉晶速度': '#109800',
        '温度梯度': '#109800',
        '模组加热温度': '#109800',
        '模组升温速度': '#109800',
        '金属液静置时间': '#109800',
        '冷却时间': '#109800',
        '手工清壳/水力清壳': '#ca8622',
        '线切割/砂轮切割': '#ca8622',
        '脱芯液成分': '#ca8622',
        '脱芯温度': '#ca8622',
        '脱芯压力': '#ca8622',
        '脱芯时间': '#ca8622',
        '打磨时长': '#ca8622',
        '型芯强度': '#c23531',
        '型芯收缩率': '#c23531',
        '型芯尺寸偏差': '#c23531',
        '蜡模强度': '#3592FF',
        '蜡模尺寸偏差': '#3592FF',
        '蜡模是否完整': '#3592FF',
        '模壳收缩率': '#3a5e77',
        '粘砂缺陷': '#3a5e77',
        '夹杂缺陷': '#3a5e77',
        '模壳强度': '#3a5e77',
        '模壳质量缺陷': '#3a5e77',
        '模壳裂纹缺陷': '#3a5e77',
        '蜡料残留': '#3a5e77',
        '模壳内表面缺陷': '#3a5e77',
        '内表面杂质': '#3a5e77',
        '型芯裂纹断裂': '#c23531',
        '有无型芯缺陷': '#c23531',
        '型芯力学性能': '#c23531',
        '型芯尺寸': '#c23531',
        '叶片型面尺寸': '#4c86ac',
        '小角度晶界偏差': '#4c86ac',
        '叶片尺寸精度': '#4c86ac',
        '有无叶片夹杂缺陷': '#4c86ac',
        '表面粗糙度': '#4c86ac',
        '有无表面再结晶': '#4c86ac',
        '是否有残芯': '#4c86ac',
        '有无叶片裂纹断裂': '#4c86ac',
        '有无叶片表面缺陷': '#4c86ac'
      },
      linkChart: [],
            
      // 待删除
      linkChart1: [
        {source: '搅拌速度11111111111111111111111111111111', target: '型芯材料'},
        {source: 'x_注射压力', target: '型芯压制'},
        {source: 'x_保压时间', target: '型芯压制'},
        {source: 'x_模板预热温度', target: '型芯压制'},
        {source: '浆料缸温度', target: '型芯压制'},
        {source: 'x_合模压力', target: '型芯压制'},
        {source: 'x_烧结温度', target: '型芯焙烧'},
        {source: 'x_保温时间', target: '型芯焙烧'},
        {source: 'x_升温速度', target: '型芯焙烧'},
        {source: 'x_降温速度', target: '型芯焙烧'},
        {source: '高温强化时间', target: '型芯强化'},
        {source: '室温强化时间', target: '型芯强化'},
        {source: '型芯材料', target: '型芯强度'},
        {source: '型芯压制', target: '型芯强度'},
        {source: '型芯压制', target: '型芯收缩率'},
        {source: '型芯压制', target: '型芯尺寸偏差'},
        {source: '型芯焙烧', target: '型芯强度'},
        {source: '型芯焙烧', target: '型芯收缩率'},
        {source: '型芯强化', target: '型芯强度'},
        {source: '型芯强度', target: '型芯裂纹断裂'},
        {source: '型芯强度', target: '有无型芯缺陷'},
        {source: '型芯强度', target: '型芯力学性能'},
        {source: '型芯收缩率', target: '型芯裂纹断裂'},
        {source: '型芯收缩率', target: '型芯力学性能'},
        {source: '型芯尺寸偏差', target: '型芯尺寸'},
        {source: '型芯材料', target: '型芯压制'},
        {source: '型芯压制', target: '型芯焙烧'},
        {source: '型芯焙烧', target: '型芯强化'},
        {source: '型芯强化', target: '蜡模模料'},
        {source: '收缩率', target: '蜡模模料'},
        {source: '软化点', target: '蜡模模料'},
        {source: '变形率', target: '蜡模模料'},
        {source: '表面强度', target: '蜡模模料'},
        {source: '灰分', target: '蜡模模料'},
        {source: 'l_粘度', target: '蜡模模料'},
        {source: '化学质量', target: '蜡模模料'},
        {source: 'l_注射压力', target: '蜡模压制'},
        {source: 'l_保压时间', target: '蜡模压制'},
        {source: 'l_模板预热温度', target: '蜡模压制'},
        {source: '蜡膏温度', target: '蜡模压制'},
        {source: 'l_环境温度', target: '蜡模压制'},
        {source: 'l_合模压力', target: '蜡模压制'},
        {source: '蜡模模料', target: '蜡模是否完整'},
        {source: '蜡模模料', target: '蜡模强度'},
        {source: '蜡模模料', target: '蜡模尺寸偏差'},
        {source: '蜡模压制', target: '蜡模强度'},
        {source: '蜡模压制', target: '蜡模尺寸偏差'},
        {source: '蜡模是否完整', target: '叶片型面尺寸'},
        {source: '蜡模是否完整', target: '有无叶片夹杂缺陷'},
        {source: '蜡模强度', target: '有无叶片裂纹断裂'},
        {source: '蜡模强度', target: '叶片尺寸精度'},
        {source: '蜡模尺寸偏差', target: '叶片型面尺寸'},
        {source: '蜡模尺寸偏差', target: '有无叶片裂纹断裂'},
        {source: '蜡模尺寸偏差', target: '叶片尺寸精度'},
        {source: '蜡模尺寸偏差', target: '表面粗糙度'},
        {source: '蜡模模料', target: '蜡模压制'},
        {source: '蜡模压制', target: '制壳材料'},
        {source: '热膨胀性', target: '制壳材料'},
        {source: '化学成分', target: '制壳材料'},
        {source: '粒度', target: '制壳材料'},
        {source: 't_粘度', target: '粘结剂'},
        {source: 't_环境温度', target: '模壳制备'},
        {source: '模壳湿度', target: '模壳制备'},
        {source: '模壳厚度', target: '模壳制备'},
        {source: '升压速度', target: '脱蜡'},
        {source: '脱蜡压力', target: '脱蜡'},
        {source: '脱蜡温度', target: '脱蜡'},
        {source: 't_焙烧温度', target: '模壳焙烧'},
        {source: 't_保温时间', target: '模壳焙烧'},
        {source: 't_升温速度', target: '模壳焙烧'},
        {source: 't_降温速度', target: '模壳焙烧'},
        {source: '制壳材料', target: '模壳收缩率'},
        {source: '制壳材料', target: '粘砂缺陷'},
        {source: '制壳材料', target: '夹杂缺陷'},
        {source: '制壳材料', target: '模壳强度'},
        {source: '粘结剂', target: '模壳质量缺陷'},
        {source: '模壳制备', target: '模壳裂纹缺陷'},
        {source: '脱蜡', target: '模壳强度'},
        {source: '脱蜡', target: '蜡料残留'},
        {source: '模壳焙烧', target: '模壳强度'},
        {source: '模壳焙烧', target: '模壳内表面缺陷'},
        {source: '模组清洗', target: '内表面杂质'},
        {source: '模壳收缩率', target: '叶片尺寸精度'},
        {source: '粘砂缺陷', target: '有无表面再结晶'},
        {source: '夹杂缺陷', target: '叶片尺寸精度'},
        {source: '模壳强度', target: '有无叶片裂纹断裂'},
        {source: '模壳强度', target: '叶片尺寸精度'},
        {source: '模壳强度', target: '表面粗糙度'},
        {source: '模壳质量缺陷', target: '叶片尺寸精度'},
        {source: '模壳质量缺陷', target: '有无叶片表面缺陷'},
        {source: '模壳裂纹缺陷', target: '叶片尺寸精度'},
        {source: '蜡料残留', target: '有无叶片夹杂缺陷'},
        {source: '模壳内表面缺陷', target: '表面粗糙度'},
        {source: '内表面杂质', target: '有无叶片夹杂缺陷'},
        {source: '制壳材料', target: '粘结剂'},
        {source: '粘结剂', target: '模壳制备'},
        {source: '模壳制备', target: '脱蜡'},
        {source: '脱蜡', target: '模壳焙烧'},
        {source: '模壳焙烧', target: '模组清洗'},
        {source: '模组清洗', target: '浇注材料'},
        {source: '合金成分', target: '浇注材料'},
        {source: '耐火材料成分', target: '浇注材料'},
        {source: '蜡料成分', target: '浇注材料'},
        {source: '精炼温度', target: '熔炼浇注'},
        {source: '精炼时间', target: '熔炼浇注'},
        {source: 'r_真空度', target: '熔炼浇注'},
        {source: '浇注温度', target: '熔炼浇注'},
        {source: '过滤器', target: '熔炼浇注'},
        {source: '浇注速度', target: '熔炼浇注'},
        {source: '拉晶速度', target: '结晶'},
        {source: '温度梯度', target: '结晶'},
        {source: '模组加热温度', target: '结晶'},
        {source: '模组升温速度', target: '结晶'},
        {source: '金属液静置时间', target: '结晶'},
        {source: '冷却时间', target: '结晶'},
        {source: '浇注材料', target: '小角度晶界偏差'},
        {source: '浇注材料', target: '有无叶片夹杂缺陷'},
        {source: '熔炼浇注', target: '小角度晶界偏差'},
        {source: '熔炼浇注', target: '有无叶片夹杂缺陷'},
        {source: '结晶', target: '小角度晶界偏差'},
        {source: '结晶', target: '有无叶片夹杂缺陷'},
        {source: '结晶', target: '叶片尺寸精度'},
        {source: '浇注材料', target: '熔炼浇注'},
        {source: '熔炼浇注', target: '结晶'},
        {source: '结晶', target: '清壳切割'},
        {source: '手工清壳/水力清壳', target: '清壳切割'},
        {source: '线切割/砂轮切割', target: '清壳切割'},
        {source: '脱芯液成分', target: '脱芯'},
        {source: '脱芯温度', target: '脱芯'},
        {source: '脱芯压力', target: '脱芯'},
        {source: '脱芯时间', target: '脱芯'},
        {source: '打磨时长', target: '吹砂打磨'},
        {source: '热处理温度', target: '热处理'},
        {source: 'h_升温速度', target: '热处理'},
        {source: 'h_降温速度', target: '热处理'},
        {source: '气淬压力', target: '热处理'},
        {source: 'h_真空度', target: '热处理'},
        {source: '清壳切割', target: '表面粗糙度'},
        {source: '清壳切割', target: '有无表面再结晶'},
        {source: '脱芯', target: '是否有残芯'},
        {source: '吹砂打磨', target: '有无表面再结晶'},
        {source: '热处理', target: '小角度晶界偏差'},
        {source: '热处理', target: '叶片尺寸精度'},
        {source: '热处理', target: '表面粗糙度'},
        {source: '清壳切割', target: '脱芯'},
        {source: '脱芯', target: '吹砂打磨'},
        {source: '吹砂打磨', target: '热处理'},
        {source: '型芯强度', target: '蜡模是否完整'},
        {source: '型芯强度', target: '蜡模强度'},
        {source: '型芯强度', target: '蜡模尺寸偏差'},
        {source: '型芯收缩率', target: '蜡模是否完整'},
        {source: '型芯收缩率', target: '蜡模强度'},
        {source: '型芯收缩率', target: '蜡模尺寸偏差'},
        {source: '蜡模强度', target: '模壳收缩率'},
        {source: '蜡模强度', target: '夹杂缺陷'},
        {source: '蜡模强度', target: '模壳强度'},
        {source: '蜡模强度', target: '模壳质量缺陷'},
        {source: '蜡模强度', target: '模壳裂纹缺陷'},
        {source: '蜡模尺寸偏差', target: '模壳收缩率'},
        {source: '蜡模尺寸偏差', target: '夹杂缺陷'},
        {source: '蜡模尺寸偏差', target: '模壳强度'},
        {source: '蜡模尺寸偏差', target: '模壳质量缺陷'},
        {source: '蜡模尺寸偏差', target: '模壳裂纹缺陷'}
      ],
      linkChart2: [
        {source: '搅拌速度', target: '型芯强度'},
        {source: 'x_注射压力', target: '型芯强度'},
        {source: 'x_保压时间', target: '型芯收缩率'},
        {source: 'x_模板预热温度', target: '型芯强度'},
        {source: '浆料缸温度', target: '型芯强度'},
        {source: 'x_合模压力', target: '型芯尺寸偏差'},
        {source: 'x_烧结温度', target: '型芯收缩率'},
        {source: 'x_保温时间', target: '型芯强度'},
        {source: 'x_升温速度', target: '型芯强度'},
        {source: 'x_降温速度', target: '型芯强度'},
        {source: '高温强化时间', target: '型芯强度'},
        {source: '室温强化时间', target: '型芯强度'},
        {source: '型芯强度', target: '型芯裂纹断裂'},
        {source: '型芯强度', target: '有无型芯缺陷'},
        {source: '型芯强度', target: '型芯力学性能'},
        {source: '型芯收缩率', target: '型芯裂纹断裂'},
        {source: '型芯收缩率', target: '型芯力学性能'},
        {source: '型芯尺寸偏差', target: '型芯尺寸'},
        {source: '收缩率', target: '蜡模尺寸偏差'},
        {source: '软化点', target: '蜡模尺寸偏差'},
        {source: '变形率', target: '蜡模尺寸偏差'},
        {source: '表面强度', target: '蜡模尺寸偏差'},
        {source: '灰分', target: '蜡模是否完整'},
        {source: 'l_粘度', target: '蜡模是否完整'},
        {source: '化学质量', target: '蜡模强度'},
        {source: '化学质量', target: '蜡模尺寸偏差'},
        {source: 'l_注射压力', target: '蜡模强度'},
        {source: 'l_保压时间', target: '蜡模尺寸偏差'},
        {source: 'l_模板预热温度', target: '蜡模强度'},
        {source: '蜡膏温度', target: '蜡模尺寸偏差'},
        {source: 'l_环境温度', target: '蜡模尺寸偏差'},
        {source: 'l_合模压力', target: '蜡模尺寸偏差'},
        {source: '蜡模是否完整', target: '叶片型面尺寸'},
        {source: '蜡模是否完整', target: '有无叶片夹杂缺陷'},
        {source: '蜡模强度', target: '有无叶片裂纹断裂'},
        {source: '蜡模强度', target: '叶片尺寸精度'},
        {source: '蜡模尺寸偏差', target: '叶片型面尺寸'},
        {source: '蜡模尺寸偏差', target: '有无叶片裂纹断裂'},
        {source: '蜡模尺寸偏差', target: '叶片尺寸精度'},
        {source: '蜡模尺寸偏差', target: '表面粗糙度'},
        {source: '热膨胀性', target: '模壳收缩率'},
        {source: '化学成分', target: '粘砂缺陷'},
        {source: '化学成分', target: '夹杂缺陷'},
        {source: '粒度', target: '模壳强度'},
        {source: 't_粘度', target: '模壳质量缺陷'},
        {source: 't_环境温度', target: '模壳强度'},
        {source: '模壳湿度', target: '模壳裂纹缺陷'},
        {source: '模壳厚度', target: '模壳裂纹缺陷'},
        {source: '升压速度', target: '模壳强度'},
        {source: '脱蜡压力', target: '模壳强度'},
        {source: '脱蜡温度', target: '蜡料残留'},
        {source: 't_焙烧温度', target: '模壳强度'},
        {source: 't_保温时间', target: '模壳强度'},
        {source: 't_升温速度', target: '模壳内表面缺陷'},
        {source: 't_降温速度', target: '模壳强度'},
        {source: '模壳收缩率', target: '叶片尺寸精度'},
        {source: '粘砂缺陷', target: '有无表面再结晶'},
        {source: '夹杂缺陷', target: '叶片尺寸精度'},
        {source: '模壳强度', target: '有无叶片裂纹断裂'},
        {source: '模壳强度', target: '叶片尺寸精度'},
        {source: '模壳强度', target: '表面粗糙度'},
        {source: '模壳质量缺陷', target: '叶片尺寸精度'},
        {source: '模壳质量缺陷', target: '有无叶片表面缺陷'},
        {source: '模壳裂纹缺陷', target: '叶片尺寸精度'},
        {source: '蜡料残留', target: '有无叶片夹杂缺陷'},
        {source: '模壳内表面缺陷', target: '表面粗糙度'},
        {source: '内表面杂质', target: '有无叶片夹杂缺陷'},
        {source: '合金成分', target: '小角度晶界偏差'},
        {source: '耐火材料成分', target: '小角度晶界偏差'},
        {source: '蜡料成分', target: '有无叶片夹杂缺陷'},
        {source: '精炼温度', target: '小角度晶界偏差'},
        {source: '精炼时间', target: '小角度晶界偏差'},
        {source: 'r_真空度', target: '有无叶片夹杂缺陷'},
        {source: '浇注温度', target: '小角度晶界偏差'},
        {source: '过滤器', target: '有无叶片夹杂缺陷'},
        {source: '浇注速度', target: '有无叶片夹杂缺陷'},
        {source: '拉晶速度', target: '小角度晶界偏差'},
        {source: '温度梯度', target: '小角度晶界偏差'},
        {source: '模组加热温度', target: '叶片尺寸精度'},
        {source: '模组升温速度', target: '叶片尺寸精度'},
        {source: '金属液静置时间', target: '有无叶片夹杂缺陷'},
        {source: '冷却时间', target: '叶片尺寸精度'},
        {source: '冷却时间', target: '小角度晶界偏差'},
        {source: '手工清壳/水力清壳', target: '表面粗糙度'},
        {source: '线切割/砂轮切割', target: '表面粗糙度'},
        {source: '线切割/砂轮切割', target: '有无表面再结晶'},
        {source: '脱芯液成分', target: '是否有残芯'},
        {source: '脱芯温度', target: '是否有残芯'},
        {source: '脱芯压力', target: '是否有残芯'},
        {source: '脱芯时间', target: '是否有残芯'},
        {source: '打磨时长', target: '有无表面再结晶'},
        {source: '热处理温度', target: '小角度晶界偏差'},
        {source: 'h_升温速度', target: '小角度晶界偏差'},
        {source: 'h_降温速度', target: '小角度晶界偏差'},
        {source: '气淬压力', target: '小角度晶界偏差'},
        {source: '气淬压力', target: '叶片尺寸精度'},
        {source: 'h_真空度', target: '表面粗糙度'},
        {source: '型芯强度', target: '蜡模是否完整'},
        {source: '型芯强度', target: '蜡模强度'},
        {source: '型芯强度', target: '蜡模尺寸偏差'},
        {source: '型芯收缩率', target: '蜡模是否完整'},
        {source: '型芯收缩率', target: '蜡模强度'},
        {source: '型芯收缩率', target: '蜡模尺寸偏差'},
        {source: '蜡模强度', target: '模壳收缩率'},
        {source: '蜡模强度', target: '夹杂缺陷'},
        {source: '蜡模强度', target: '模壳强度'},
        {source: '蜡模强度', target: '模壳质量缺陷'},
        {source: '蜡模强度', target: '模壳裂纹缺陷'},
        {source: '蜡模尺寸偏差', target: '模壳收缩率'},
        {source: '蜡模尺寸偏差', target: '夹杂缺陷'},
        {source: '蜡模尺寸偏差', target: '模壳强度'},
        {source: '蜡模尺寸偏差', target: '模壳质量缺陷'},
        {source: '蜡模尺寸偏差', target: '模壳裂纹缺陷'}
      ],
      
      linkthead: [],
      linkData: [
        {label: '搅拌速度', degree1: '1', degree2: '1'},
        {label: 'x_注射压力', degree1: '1', degree2: '1'},
        {label: 'x_保压时间', degree1: '1', degree2: '1'},
        {label: 'x_模板预热温度', degree1: '1', degree2: '1'},
        {label: '浆料缸温度', degree1: '1', degree2: '1'},
        {label: 'x_合模压力', degree1: '1', degree2: '1'},
        {label: 'x_烧结温度', degree1: '1', degree2: '1'},
        {label: 'x_保温时间', degree1: '1', degree2: '1'},
        {label: 'x_升温速度', degree1: '1', degree2: '1'},
        {label: 'x_降温速度', degree1: '1', degree2: '1'},
        {label: '高温强化时间', degree1: '1', degree2: '1'},
        {label: '室温强化时间', degree1: '1', degree2: '1'},
        {label: '收缩率', degree1: '1', degree2: '1'},
        {label: '软化点', degree1: '1', degree2: '1'},
        {label: '变形率', degree1: '1', degree2: '1'},
        {label: '表面强度', degree1: '1', degree2: '1'},
        {label: '灰分', degree1: '1', degree2: '1'},
        {label: 'l_粘度', degree1: '1', degree2: '1'},
        {label: '化学质量', degree1: '1', degree2: '2'},
        {label: 'l_注射压力', degree1: '1', degree2: '1'},
        {label: 'l_保压时间', degree1: '1', degree2: '1'},
        {label: 'l_模板预热温度', degree1: '1', degree2: '1'},
        {label: '蜡膏温度', degree1: '1', degree2: '1'},
        {label: 'l_环境温度', degree1: '1', degree2: '1'},
        {label: 'l_合模压力', degree1: '1', degree2: '1'},
        {label: '热膨胀性', degree1: '1', degree2: '1'},
        {label: '化学成分', degree1: '1', degree2: '2'},
        {label: '粒度', degree1: '1', degree2: '1'},
        {label: 't_粘度', degree1: '1', degree2: '1'},
        {label: 't_环境温度', degree1: '1', degree2: '1'},
        {label: '模壳湿度', degree1: '1', degree2: '1'},
        {label: '模壳厚度', degree1: '1', degree2: '1'},
        {label: '升压速度', degree1: '1', degree2: '1'},
        {label: '脱蜡压力', degree1: '1', degree2: '1'},
        {label: '脱蜡温度', degree1: '1', degree2: '1'},
        {label: 't_焙烧温度', degree1: '1', degree2: '1'},
        {label: 't_保温时间', degree1: '1', degree2: '1'},
        {label: 't_升温速度', degree1: '1', degree2: '1'},
        {label: 't_降温速度', degree1: '1', degree2: '1'},
        {label: '合金成分', degree1: '1', degree2: '1'},
        {label: '耐火材料成分', degree1: '1', degree2: '1'},
        {label: '蜡料成分', degree1: '1', degree2: '1'},
        {label: '精炼温度', degree1: '1', degree2: '1'},
        {label: '精炼时间', degree1: '1', degree2: '1'},
        {label: 'r_真空度', degree1: '1', degree2: '1'},
        {label: '浇注温度', degree1: '1', degree2: '1'},
        {label: '过滤器', degree1: '1', degree2: '1'},
        {label: '浇注速度', degree1: '1', degree2: '1'},
        {label: '拉晶速度', degree1: '1', degree2: '1'},
        {label: '温度梯度', degree1: '1', degree2: '1'},
        {label: '模组加热温度', degree1: '1', degree2: '1'},
        {label: '模组升温速度', degree1: '1', degree2: '1'},
        {label: '金属液静置时间', degree1: '1', degree2: '1'},
        {label: '冷却时间', degree1: '1', degree2: '2'},
        {label: '手工清壳/水力清壳', degree1: '1', degree2: '1'},
        {label: '线切割/砂轮切割', degree1: '1', degree2: '2'},
        {label: '脱芯液成分', degree1: '1', degree2: '1'},
        {label: '脱芯温度', degree1: '1', degree2: '1'},
        {label: '脱芯压力', degree1: '1', degree2: '1'},
        {label: '脱芯时间', degree1: '1', degree2: '1'},
        {label: '打磨时长', degree1: '1', degree2: '1'},
        {label: '热处理温度', degree1: '1', degree2: '1'},
        {label: 'h_升温速度', degree1: '1', degree2: '1'},
        {label: 'h_降温速度', degree1: '1', degree2: '1'},
        {label: '气淬压力', degree1: '1', degree2: '2'},
        {label: 'h_真空度', degree1: '1', degree2: '1'},
        {label: '型芯材料', degree1: '3', degree2: '0'},
        {label: '型芯压制', degree1: '10', degree2: '0'},
        {label: '型芯焙烧', degree1: '8', degree2: '0'},
        {label: '型芯强化', degree1: '5', degree2: '0'},
        {label: '蜡模模料', degree1: '12', degree2: '0'},
        {label: '蜡模压制', degree1: '10', degree2: '0'},
        {label: '制壳材料', degree1: '9', degree2: '0'},
        {label: '粘结剂', degree1: '4', degree2: '0'},
        {label: '模壳制备', degree1: '6', degree2: '0'},
        {label: '脱蜡', degree1: '7', degree2: '0'},
        {label: '模壳焙烧', degree1: '8', degree2: '0'},
        {label: '模组清洗', degree1: '3', degree2: '0'},
        {label: '浇注材料', degree1: '7', degree2: '0'},
        {label: '熔炼浇注', degree1: '10', degree2: '0'},
        {label: '结晶', degree1: '11', degree2: '0'},
        {label: '清壳切割', degree1: '6', degree2: '0'},
        {label: '脱芯', degree1: '7', degree2: '0'},
        {label: '吹砂打磨', degree1: '4', degree2: '0'},
        {label: '热处理', degree1: '9', degree2: '0'},
        {label: '型芯强度', degree1: '10', degree2: '15'},
        {label: '型芯收缩率', degree1: '7', degree2: '7'},
        {label: '型芯尺寸偏差', degree1: '2', degree2: '2'},
        {label: '蜡模强度', degree1: '11', degree2: '12'},
        {label: '蜡模尺寸偏差', degree1: '13', degree2: '20'},
        {label: '蜡模是否完整', degree1: '5', degree2: '6'},
        {label: '模壳收缩率', degree1: '4', degree2: '4'},
        {label: '粘砂缺陷', degree1: '2', degree2: '2'},
        {label: '夹杂缺陷', degree1: '4', degree2: '4'},
        {label: '模壳强度', degree1: '8', degree2: '12'},
        {label: '模壳质量缺陷', degree1: '5', degree2: '5'},
        {label: '模壳裂纹缺陷', degree1: '4', degree2: '5'},
        {label: '蜡料残留', degree1: '2', degree2: '2'},
        {label: '模壳内表面缺陷', degree1: '2', degree2: '2'},
        {label: '内表面杂质', degree1: '2', degree2: '1'},
        {label: '型芯裂纹断裂', degree1: '2', degree2: '2'},
        {label: '有无型芯缺陷', degree1: '1', degree2: '1'},
        {label: '型芯力学性能', degree1: '2', degree2: '2'},
        {label: '型芯尺寸', degree1: '1', degree2: '1'},
        {label: '叶片型面尺寸', degree1: '2', degree2: '2'},
        {label: '小角度晶界偏差', degree1: '4', degree2: '12'},
        {label: '叶片尺寸精度', degree1: '9', degree2: '11'},
        {label: '有无叶片夹杂缺陷', degree1: '6', degree2: '8'},
        {label: '表面粗糙度', degree1: '5', degree2: '6'},
        {label: '有无表面再结晶', degree1: '3', degree2: '3'},
        {label: '是否有残芯', degree1: '1', degree2: '4'},
        {label: '有无叶片裂纹断裂', degree1: '3', degree2: '3'},
        {label: '有无叶片表面缺陷', degree1: '1', degree2: '1'}
      ],
      networkChart: {
        color:["#d53a35", "#2f4554", "#61a0a8", "#ca8622", "#8378ea", "#73a373",],
        title: {text: ''},
        tooltip: {},
        animationDurationUpdate: 1500,
        animationEasingUpdate: 'quinticInOut',
        legend: {
          x: 'left',
          show: true,
          // data: [] // 此处不显示根节点学生
        },
        series: [
          {
            type: 'graph',
            layout: 'force',
            symbolSize: function (size) {
              return size
            },
            focusNodeAdjacency: true,
            roam: true,
            categories: [],
            label: {
              normal: {
                show: true,
                textStyle: {
                  fontSize: 12
                }
              }
            },
            force: {
              repulsion: 1000
            },
            tooltip: {
              formatter: function (node) { // 区分连线和节点，节点上额外显示其他数字
                return node.data.name
              }
            },
            lineStyle: {
              normal: {
                opacity: 1,
                width: 2,
                curveness: 0.2//边的曲度
              }
            },
            edgeSymbol: ['circle', 'arrow'],//箭头
            edgeSymbolSize: [4, 10],
            data: [],
            links: []
          }
        ]
      },
      tab3Radio: [
        {id: 1, radioName: '工序选择'},
        {id: 2, radioName: '参数选择'}
      ],
      tab4Radio: [
        {id: 1, radioName: '参数选择'}
      ],
      tab3Thead: [
        {label: '工艺参数', prop: 'shap'},
        {label: 'SHAP value', prop: 'value'}
      ],
      table3Data: [],
      tab4Thead: [],
      table4Data: [],
      tab3Resname: '关键参数',
      tab4Resname: '存在联动作用的参数',
      key3Param: [
        {id: 1, name: '参数1'},
        {id: 2, name: '参数2'},
        {id: 3, name: '参数3'}
      ],
      key4Param: [
        {id: 1, name: '参数55'},
        {id: 2, name: '参数89'},
        {id: 3, name: '参数94'}
      ],
      chart3_1_data: {
        color: ['#3398DB'],
        tooltip: {
          trigger: 'axis',
          axisPointer: { // 坐标轴指示器，坐标轴触发有效
            type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
          }
        },
        grid: {
          left: '3%',
          right: '4%',
          bottom: '3%',
          containLabel: true
        },
        xAxis: [
          {
            type: 'category',
            data: [],
            axisTick: {
              alignWithLabel: true
            },
            axisLabel: { //  坐标轴刻度标签的相关设置。
              interval: 0,
              rotate: '45'
            }
          }
        ],
        yAxis: [
          {
            type: 'value'
          }
        ],
        series: [
          {
            name: '',
            type: 'bar',
            barWidth: '80%',
            data: [],
            label: {
              show: true,
              position: 'top'
            }
          }
        ]
      },
      chart3_2_data: {
        visualMap: {
          min: 0,
          max: 4,
          dimension: 1,
          orient: 'vertical',
          right: 10,
          top: 'center',
          text: ['HIGH', 'LOW'],
          calculable: true,
          inRange: {
            color: ['rgb(56, 136, 243)', 'rgb(234, 51, 88)']
          }
        },
        tooltip: {
          trigger: 'item',
          axisPointer: {
            type: 'cross'
          },
          formatter: function (param) {
            return param.data[0]
          }
        },
        xAxis: [{
          type: 'value'
        }],
        yAxis: [{
          type: 'value'
        }],
        series: [{
          name: '',
          type: 'scatter',
          symbolSize: 5,
          // itemStyle: {
          //     normal: {
          //         borderWidth: 0.2,
          //         borderColor: '#fff'
          //     }
          // },
          data: []
        }]
      },
      heatMapData: {
        'grid': {
          'top': 80
        },
        'tooltip': {
          'show': true
        },
        'xAxis': {
          'position': 'bottom',
          'name': '',
          'type': 'category',
          nameRotate:20,
          'data': [],
          'splitArea': {
            'show': true
          },
          'axisLine': {
            'show': false
          },
          'axisTick': {
            'show': false
          }
        },
        'yAxis': {
          'nameLocation': 'end',
          'type': 'category',
          'data': [],
          'axisLine': {
            'show': false
          },
          'axisTick': {
            'show': false
          },
          'axisLabel': {
            'rich': {
              'red': {
                'color': '#f00'
              }
            }
          },
          'splitArea': {
            'show': true
          }
        },
        'visualMap': {
          'min': 0,
          'max': 0.01,
          precision:5,//小数点数
          // text:['min','max'],
          'calculable': true,
          'orient': 'horizontal',
          'right': '30%',
          'top': '10',
          'color': ['rgb(56, 136, 243)', 'rgb(234, 51, 88)']
        },
        'series': [{
          'name': '',
          'type': 'heatmap',
          'data': [],
          'label': {
            'normal': {
              'show': false
            }
          },
          'itemStyle': {
            'normal': {
              'borderColor': 'rgba(255, 255, 255, 0.8)'
            },
            'emphasis': {
              'shadowBlur': 10,
              'shadowColor': 'rgba(255, 255, 255, 0.5)'
            }
          }
        }]
      },
      scatterData2: {
        visualMap: {
          min: 0,
          max: 0.1,
          dimension: 1,
          orient: 'vertical',
          right: 10,
          top: 'center',
          text: ['HIGH', 'LOW'],
          calculable: true,
          inRange: {
            color: ['rgb(56, 136, 243)', 'rgb(234, 51, 88)']
          }
        },
        tooltip: {
          trigger: 'item',
          axisPointer: {
            type: 'cross'
          },
          formatter: function (param) {
            return param.data[0]
          }
        },
        xAxis: [{
          type: 'value'
        }],
        yAxis: [{
          type: 'value'
        }],
        series: [{
          name: '',
          type: 'scatter',
          symbolSize: 5,
          // itemStyle: {
          //     normal: {
          //         borderWidth: 0.2,
          //         borderColor: '#fff'
          //     }
          // },
          data: []
        }]
      },
      scatterimg: '',
      
      gongyiliucheng_file:'',
      guanjiancanshushibie_file:'',
      gonggui_file: '',
      process_file: '',
      filelist:[],
      three_file_list:[],
      three_file_1:'',
      isliandongzhijian:'是',////是否包含联动质检：
      // showthreefilebtn:false
      barimg:'',
      options1:[]
    }
  },
  methods: {
    showTab (tab) {
      this.activeIdx = Number(tab)
      this.showImg1 = false
      this.showImg2 = false
      this.showImg34 = false
      
      if(this.activeIdx == 3){
        this.firstTit = 'SHAP Value'
      }else if(this.activeIdx == 4){
        this.firstTit = 'Interaction Value'
      }
      
      // 切换到关键参数识别，联动作用分析时，清空上传的文件
      // if(this.activeIdx > 2){
        // console.log(this.$refs)
        if(this.$refs.upload){
          this.$refs.upload.clearFiles()
        }
      // }
    },
    stepChange () {
      this.gxStep = this.tableData[this.gxRadio]
    },
    gyRadio () {
      this.flowChartData()
    },
    wlRadio () {
      var gongxumapping = {
        1:'第1道工序',
        2:'第2道工序',
        3:'第3道工序',
        4:'第4道工序',
        5:'第5道工序',
        0:'终检',
      }
      
      this.linkthead = []
      
      this.networkChart.series[0].data = []
      this.networkChart.series[0].categories = []
      
      this.networkChart.series[0].categories = [
        // {name:'第1道工序'},
        // {name:'第2道工序'},
        // {name:'第3道工序'},
        // {name:'第4道工序'},
        // {name:'第5道工序'},
        // {name:'终检'},
      ]
      
      // 全节点 【单选框已去掉】【现在默认就是全节点的】【在这里面写页面默认状态】
      if (this.wangluoRadio === 1) {
        // 节点连接度表格
        this.linkthead = [
          {label: 'Nodes', prop: 'label'},
          {label: 'degree', prop: 'degree1'}
        ]
        var t = this.linkData.sort(function (a, b) {
          return Number(b.degree1) - Number(a.degree1)
        })
        this.linkData = [];//节点连接度 默认展示空表格
        this.keygz = [
          {id: 'K1', name: t[0]['label']},
          {id: 'K2', name: t[1]['label']},
          {id: 'K3', name: t[2]['label']}
        ]
        this.keygz = [
          {id: 'K1', name: ''},
          {id: 'K2', name: ''},
          {id: 'K3', name: ''}
        ]
        // 节点连接度表格
        
        // G4全部节点
        G4DATA_node.forEach(item => {
          this.networkChart.series[0].data.push({
            // name: item,
            name: item.name,
            category:gongxumapping[item.category],
            
            itemStyle: {
              // color: this.linkchartCorrespond[item]
            },
            draggable: true, // 是否可以拖拽，默认false
            //  category: 0, // 这是种类，运维1测试2应用3实施4开发5
            //  number: 10, // 这是编号 非必须，目的仅为方便编写line
            value: 60 // 图形大小
            //  showNum: 25 // 节点需要显示的额外内容
          })
        })
        // 连线数据
        this.networkChart.series[0].links = G4DATA_link
        // 默认不画图---
        this.networkChart.series[0].data = []
        this.networkChart.series[0].links = []
        
      // 无工步 【单选框已去掉】【弃用】
      } else if (this.wangluoRadio === 2){
        // this.linkChart = this.linkChart2
        this.linkthead = [
          {label: 'Nodes', prop: 'label'},
          {label: 'degree', prop: 'degree2'}
        ]
        var t = this.linkData.sort(function (a, b) {
          return Number(b.degree2) - Number(a.degree2)
        })
        this.keygz = [
          {id: 'K1', name: t[0]['label']},
          {id: 'K2', name: t[1]['label']},
          {id: 'K3', name: t[2]['label']}
        ]
        
        // G3全部节点
        G3DATA_node.forEach(item => {
          this.networkChart.series[0].data.push({
            // name: item,
            name: item.name,
            category:gongxumapping[item.category],
            
            itemStyle: {
              // color: this.linkchartCorrespond[item]
            },
            draggable: true, // 是否可以拖拽，默认false
            //  category: 0, // 这是种类，运维1测试2应用3实施4开发5
            //  number: 10, // 这是编号 非必须，目的仅为方便编写line
            value: 60 // 图形大小
            //  showNum: 25 // 节点需要显示的额外内容
          })
        })
        // 连线数据
        this.networkChart.series[0].links = G3DATA_link
      }
      
      // 以下好像没用了
      var legendList = []
      
      this.linkChart.forEach(item => {
        var {source, target} = item
        if (legendList.indexOf(source) === -1) {
          legendList.push(source)
          // this.networkChart.series[0].categories.push({name: source})
        }
        if (legendList.indexOf(target) === -1) {
          legendList.push(target)
          // this.networkChart.series[0].categories.push({name: target})
        }
      })
      setTimeout(() => {
        // legendList.forEach(item => {
        
      })
      console.log(this.networkChart)
    },
    flowChartData () {
      //  固定中间检
      this.flowData3.series[0].links = this.FlowChart3
      this.flowData3.series[0].data = [
        {name: '型芯强度', value: '1000', symbolSize: 80, x: 700, y: -800},
        {name: '型芯收缩率', value: '1000', symbolSize: 80, x: 1000, y: -800},
        {name: '尺寸偏差', value: '1000', symbolSize: 80, x: 1300, y: -800},
        {name: '蜡模是否完整', value: '1000', symbolSize: 80, x: 700, y: -300, itemStyle: {color: '#4592FF'}},
        {name: '蜡模强度', value: '1000', symbolSize: 80, x: 1000, y: -300, itemStyle: {color: '#4592FF'}},
        {name: '蜡模尺寸偏差', value: '1000', symbolSize: 80, x: 1300, y: -300, itemStyle: {color: '#4592FF'}},
        {name: '模壳收缩率', value: '1000', symbolSize: 80, x: 200, y: 200, itemStyle: {color: '#109800'}},
        {name: '粘砂缺陷', value: '1000', symbolSize: 80, x: 400, y: 200, itemStyle: {color: '#109800'}},
        {name: '夹杂缺陷', value: '1000', symbolSize: 80, x: 600, y: 200, itemStyle: {color: '#109800'}},
        {name: '模壳强度', value: '1000', symbolSize: 80, x: 800, y: 200, itemStyle: {color: '#109800'}},
        {name: '模壳质量缺陷', value: '1000', symbolSize: 80, x: 1000, y: 200, itemStyle: {color: '#109800'}},
        {name: '模壳裂纹缺陷', value: '1000', symbolSize: 80, x: 1200, y: 200, itemStyle: {color: '#109800'}},
        {name: '蜡料残留', value: '1000', symbolSize: 80, x: 1400, y: 200, itemStyle: {color: '#109800'}},
        {name: '模壳内表面缺陷', value: '1000', symbolSize: 80, x: 1600, y: 200, itemStyle: {color: '#109800'}},
        {name: '内表面杂质', value: '1000', symbolSize: 80, x: 1800, y: 200, itemStyle: {color: '#109800'}}
      ]
      //  全工序
      this.flowData1.series[0].links = this.FlowChart1
      this.flowData1.series[0].data = data1
      //  3步
      this.flowData2.series[0].links = this.FlowChart2
      this.flowData2.series[0].data = data2
    },
    resultFun (val1, val2) {
      // 显示loading保存loading实例
      let loadingInstance = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      })
      if (this.activeIdx === 3) {
        /*
        //  关键参数识别
        this.$api.keyParameter({
          step: val1,
          args: val2,
          file: JSON.stringify(this.guanjiancanshushibie_file),
        }).then(result => {
          
          var res = JSON.parse(result)
          console.log(res)
          // this.tab3Thead = []
          this.table3Data = []
          //  柱图
          // 清空
          this.chart3_1_data.xAxis[0].data = []
          this.chart3_1_data.series[0].data = []
          res[0].forEach(item => {
            this.chart3_1_data.xAxis[0].data.push(item[0])
            this.chart3_1_data.series[0].data.push(item[1])
            this.table3Data.push({shap: item[0], value: item[1]})
          })
          //  散点图
          // var len = res[1][0].length
          // this.chart3_2_data.visualMap.max = Number(len) + 3
          // res[1].forEach((item1, index1) => {
          //   item1.forEach((item2, index2) => {
          //     this.chart3_2_data.series[0].data.push([
          //       item2, (index2 + 2 + item2)
          //     ])
          //   })
          // })
          this.scatterimg = ""
          this.scatterimg = '/simulation/linkage_chart_data?file_name=' + res[3]
          
          // 结论-存在联动作用的参数
          this.key3Param = []
          for(var i=0;i<res[1].length;i++){
            this.key3Param.push(
              {
                id:i,
                name:res[1][i]
              }
            )
          }
          
          loadingInstance.close()
        }).catch(res => {
          this.$alert(res, '提示')
        })
        */
        // 关键参数识别 2019-12-10
        console.log(this.gonggui_file)
        console.log(this.process_file)
        this.$api.shap_value_key({
          step: val1,
          args: val2,
          gonggui: JSON.stringify(this.gonggui_file),
          process: JSON.stringify(this.process_file),
          liandongzhijian: this.isliandongzhijian
        }).then(result => {
          
          var res = JSON.parse(result)
          console.log(res)
          // 参数选择无的时候，返回一个大list里面包含两个小list，第一个是公共参数，第二个是所有参数
          if(res.length == 2){
            // 不显示下方的图及表格
            
          }else {
            // this.tab3Thead = []
            this.table3Data = []
            //  柱图
            // // 清空
            // this.chart3_1_data.xAxis[0].data = []
            // this.chart3_1_data.series[0].data = []
            res[0].forEach(item => {
              // this.chart3_1_data.xAxis[0].data.push(item[0])
              // this.chart3_1_data.series[0].data.push(item[1])
              this.table3Data.push({shap: item[0], value: item[1]})
            })
            this.barimg = ""
            this.barimg = '/multi_process/chart_data?file_name=' + res[1]

            //  散点图
            this.scatterimg = ""
            this.scatterimg = '/multi_process/chart_data?file_name=' + res[2]
            
            // 结论-存在联动作用的参数
            this.key3Param = []
            for(var i=0;i<res[3].length;i++){
              this.key3Param.push(
                {
                  id:i,
                  name:res[3][i]
                }
              )
            }
          }
          
          loadingInstance.close()
        }).catch(res => {
          this.$alert(res, '提示')
        })
      }
      if (this.activeIdx === 4) {
        /*
        //  联动作用
        this.$api.linkageAnalyze({
          step: val1,
          args: val2,
          file: JSON.stringify(this.guanjiancanshushibie_file),
        }).then(res => {
          
          var result = JSON.parse(res)
          //  表格
          this.tab4Thead = []
          this.table4Data = []
          this.tab4Thead.push({label: ' 工 艺 参 数 ', prop: 'gycs'})
          result[1].forEach(item => {
            this.tab4Thead.push({label: '  '+item+'  ', prop: item})
          })
          
          this.heatMapData.series[0].data = []
          var minmax_arr = []
          result[0].forEach((item1, index1) => {
            var obj = {}
            obj['gycs'] = result[1][index1]
            item1.forEach((item2, index2) => {
              obj[result[1][index2]] = item2
              this.heatMapData.series[0].data.push([
                index1, index2, item2
              ])
              minmax_arr.push(item2)
            })
            this.table4Data.push(obj)
          })
          console.log(this.table4Data)
          //  热力图
          this.heatMapData.xAxis.data = result[1]
          this.heatMapData.yAxis.data = result[1]
          minmax_arr.sort(function (a, b) {
            return b-a;
          });
          console.log(minmax_arr)
          this.heatMapData.visualMap.max = minmax_arr[0]
          console.log(this.heatMapData)
          //  散点图2
          // var len = result[1][0].length
          // this.scatterData2.visualMap.max = Number(len) + 3
          // result[1].forEach((item1, index1) => {
          //   item1.forEach((item2, index2) => {
          //     item2.forEach((item3, index3) => {
          //       this.scatterData2.series[0].data.push([
          //         index2 + 1, item3 + index3
          //       ])
          //     })
          //   })
          // })
          this.scatterimg = ""
          this.scatterimg = '/simulation/linkage_chart_data?file_name=' + result[2]
          // this.$api.imgurl({
          //   file_name: result[2]
          // }).then(res => {
          //   this.scatterimg = res
          // })
          
          // 结论-存在联动作用的参数
          this.key4Param = []
          for(var i=0;i<result[3].length;i++){
            this.key4Param.push(
              {
                id:i,
                name:result[3][i]
              }
            )
          }
          
          loadingInstance.close()
        }).catch(res => {
          this.$alert(res, '提示')
        })
        */
       //  联动作用 - 2019-12-10
        this.$api.linkage({
          step: val1,
          args: val2,
          gonggui: JSON.stringify(this.gonggui_file),
          process: JSON.stringify(this.process_file),
          liandongzhijian: this.isliandongzhijian
        }).then(res => {
          var result = JSON.parse(res)
          console.log(result);
          
          //  表格
          this.tab4Thead = []
          this.table4Data = []
          this.tab4Thead.push({label: ' 工 艺 参 数 ', prop: 'gycs'})
          result[1].forEach(item => {
            this.tab4Thead.push({label: '  '+item+'  ', prop: item})
          })
          
          this.heatMapData.series[0].data = []
          var minmax_arr = []
          result[0].forEach((item1, index1) => {
            var obj = {}
            obj['gycs'] = result[1][index1]
            item1.forEach((item2, index2) => {
              obj[result[1][index2]] = item2
              this.heatMapData.series[0].data.push([
                index1, index2, item2
              ])
              minmax_arr.push(item2)
            })
            this.table4Data.push(obj)
          })
          console.log(this.table4Data)
          //  热力图
          this.heatMapData.xAxis.data = result[1]
          this.heatMapData.yAxis.data = result[1]
          minmax_arr.sort(function (a, b) {
            return b-a;
          });
          console.log(minmax_arr)
          this.heatMapData.visualMap.max = minmax_arr[0]
          console.log(this.heatMapData)
          //  散点图2
          // var len = result[1][0].length
          // this.scatterData2.visualMap.max = Number(len) + 3
          // result[1].forEach((item1, index1) => {
          //   item1.forEach((item2, index2) => {
          //     item2.forEach((item3, index3) => {
          //       this.scatterData2.series[0].data.push([
          //         index2 + 1, item3 + index3
          //       ])
          //     })
          //   })
          // })
          this.scatterimg = ""
          this.scatterimg = '/multi_process/chart_data?file_name=' + result[2]
          // this.$api.imgurl({
          //   file_name: result[2]
          // }).then(res => {
          //   this.scatterimg = res
          // })
          
          // 结论-存在联动作用的参数
          this.key4Param = []
          for(var i=0;i<result[3].length;i++){
            this.key4Param.push(
              {
                id:i,
                name:result[3][i]
              }
            )
          }
          
          loadingInstance.close()
        }).catch(res => {
          this.$alert(res, '提示')
        })
      }
    },
    // 复杂网络上传文件【暂不传文件，后续改】【弃用】
    // threefile(){
    //   this.$api.net_degree({
    //     file: three_file_1,
    //   }).then(res => {
    //     var result = JSON.parse(res)
    //     console.log(result)
    //     // result[0]  无工步的
    //     // result[1]  全节点的
    //   }).catch(res => {
    //     this.$alert(res, '提示')
    //   })
    // },
    handleRemove (file, fileList) {
      console.log(file, fileList)
    },
    handlePreview (file) {
      console.log(file)
    },
    handleExceed (files, fileList) {
      this.$message.warning(`当前限制选择 3 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`)
    },
    beforeRemove (file, fileList) {
      return this.$confirm(`确定移除 ${file.name}？`)
    },
    // 处理上传的文件
    httpRequest (file, linkflag = 0) {
      // let file = _file.files[0] // 使用传统的input方法需要加上这一步
      // const types = file.name.split('.')[1]
      // const fileType = ['xlsx', 'xlc', 'xlm', 'xls', 'xlt', 'xlw', 'csv'].some(item => item === types)
      // if (!fileType) {
      //   alert('格式错误！请重新选择')
      //   return
      // }
      this.file2Xce(file).then(tabJson => {
        
        if (tabJson && tabJson.length > 0) {
          // 工艺流程展示
          if (this.activeIdx === 1){
            this.gongyiliucheng_file = tabJson[0]['sheet']
            
            // this.$api.upload_gongxu_file({
            this.$api.upload_rule_file({
              file: JSON.stringify(this.gongyiliucheng_file),
            }).then(result => {
              var res = JSON.parse(result)
              // console.log(res)
              if(res.msg == 'success'){
                this.$alert('上传成功', '提示')
                this.options1 = []
                res['data'].forEach((item, index) =>{
                  if(item == 0){
                    this.options1.push({
                      value: item,
                      label: '工序终检'
                    })
                  }else {
                    this.options1.push({
                      value: item,
                      label: '工序'+index
                    })
                  }
                })
                // console.log(this.options1)
              }
            }).catch(res => {
              this.$alert(res, '提示')
            })
          }else if(this.activeIdx === 3 || this.activeIdx === 4) {
            // 关键参数识别、联动作用分析
            // this.guanjiancanshushibie_file = tabJson[0]['sheet']
            // 关键参数识别、联动作用分析 - 2019-12-10
            if (linkflag == 'gonggui') {
              this.gonggui_file = tabJson[0]['sheet']
            } else if (linkflag == 'gongyidata') {
              this.process_file = tabJson[0]['sheet']
            }
          }else if(this.activeIdx === 2){
            // 复杂网络分析
            // this.showthreefilebtn = true
     
            // console.log(FileList)
            this.three_file_1 = tabJson[0]['sheet']
            console.log(this.three_file_1)
            this.$api.net_degree({
              file: JSON.stringify(this.three_file_1),
            }).then(res => {
              var result = JSON.parse(res)
              console.log(result)
              this.initpage = false
              // 置空---
              var gongxumapping = {
                1:'第1道工序',
                2:'第2道工序',
                3:'第3道工序',
                4:'第4道工序',
                5:'第5道工序',
                0:'终检',
              }
              this.linkthead = []
              this.networkChart.series[0].data = []
              this.networkChart.series[0].categories = []
              this.networkChart.series[0].categories = [
                {name:'第1道工序'},
                {name:'第2道工序'},
                {name:'第3道工序'},
                {name:'第4道工序'},
                {name:'第5道工序'},
                {name:'终检'},
              ]
              this.networkChart.series[0].links = []
              // this.gongxu_net = []
              // 置空---
              // 工序信息---
              console.log(this.gongxu_net)
              // console.log(this.gongxu_net[0].name)
              // 如果先传无工步G3，那么只显示工序，如果传过全工序G4后，就一直显示G4的工序
              if(result[2][0] == 1){
                // console.log(typeof(this.gongxu_net[0].name))
                if(typeof(this.gongxu_net[0].name) == 'undefined'){
                  // 无工步
                  // this.gongxu_net = [
                  //   {id: '工序1',},
                  //   {id: '工序2',},
                  //   {id: '工序3',},
                  // ]
                  this.gongxu_net = []
                  result[2].forEach(item =>{
                    this.gongxu_net.push({
                      id: '工序'+item
                    })
                  })
                  // console.log(this.gongxu_net)
                }
              }else {
                // 全节点
                this.gongxu_net = [
                  {id: '工序1：', name: []},
                  {id: '工序2：', name: []},
                  {id: '工序3：', name: []},
                  {id: '工序4：', name: []},
                  {id: '工序5：', name: []}
                ]
                result[2].forEach(item => {
                  if(item[0] == 1){
                    this.gongxu_net[0].name.push(item[1])
                  }else if(item[0] == 2){
                    this.gongxu_net[1].name.push(item[1])
                  }else if(item[0] == 3){
                    this.gongxu_net[2].name.push(item[1])
                  }else if(item[0] == 4){
                    this.gongxu_net[3].name.push(item[1])
                  }else if(item[0] == 5){
                    this.gongxu_net[4].name.push(item[1])
                  }
                })
              }
              
              // 工序信息---
              // 节点连接度表格---
              this.linkthead = [
                {label: 'Nodes', prop: 'Iabel'},
                {label: 'degree', prop: 'degree'}
              ]
              this.linkData = result[0]
              this.keygz = [
                {id: 'K1', name: this.linkData[0]['Iabel']},
                {id: 'K2', name: this.linkData[1]['Iabel']},
                {id: 'K3', name: this.linkData[2]['Iabel']}
              ]
              // 节点连接度表格---
              // 质量传递网络图---
              this.networkChart.series[0].data = []
              result[1].forEach(item => {
                this.networkChart.series[0].data.push({
                  // name: item,
                  name: item[0],
                  category:gongxumapping[item[1]],
                  itemStyle: {
                    // color: this.linkchartCorrespond[item]
                  },
                  draggable: true, // 是否可以拖拽，默认false
                  //  category: 0, // 这是种类，运维1测试2应用3实施4开发5
                  //  number: 10, // 这是编号 非必须，目的仅为方便编写line
                  value: 60 // 图形大小
                  //  showNum: 25 // 节点需要显示的额外内容
                })
              })
              // 连线数据
              this.three_file_1.forEach(item => {
                this.networkChart.series[0].links.push({
                  source: item['Source'],
                  target: item['Target'],
                })
              })
              // this.networkChart.series[0].links = G4DATA_link
              // 质量传递网络图---
              
            }).catch(res => {
              this.$alert(res, '提示')
            })
            
            // this.three_file_1 = tabJson[0]['sheet']
            // this.$api.net_degree({
            //   file: JSON.stringify(this.three_file_1),
            // }).then(result => {
            //   var res = JSON.parse(result)
            //   // console.log(res)
            //   if(res.msg == 'success'){
            //     this.$alert('上传成功', '提示')
            //   }
            // }).catch(res => {
            //   this.$alert(res, '提示')
            // })
            
          }
        }
      })
      // console.log(this.guanjiancanshushibie_file)
    },
    file2Xce (file) {
      return new Promise(function (resolve, reject) {
        const reader = new FileReader()
        reader.onload = function (e) {
          const data = e.target.result
          this.wb = XLSX.read(data, {
            type: 'binary'
          })
          const result = []
          this.wb.SheetNames.forEach((sheetName) => {
            result.push({
              sheetName: sheetName,
              sheet: XLSX.utils.sheet_to_json(this.wb.Sheets[sheetName])
            })
          })
          resolve(result)
        }
        reader.readAsBinaryString(file.raw)
        // reader.readAsBinaryString(file) // 传统input方法
      })
    },
    clickImg () {
      if(this.activeIdx == '1'){
        this.showImg1 = !this.showImg1
      }else if(this.activeIdx == '2'){
        this.showImg2 = !this.showImg2
      }else if(this.activeIdx == '3' || this.activeIdx == '4'){
        this.showImg34 = !this.showImg34
      }
    }
  },
  mounted () {
    this.stepChange()
    this.flowChartData()
    this.wlRadio()
  },
  created:function(){
    // 加载显示 - 测试
    // let loadingInstance = this.$loading({
    //   lock: true,
    //   text: 'Loading',
    //   spinner: 'el-icon-loading',
    //   background: 'rgba(0, 0, 0, 0.7)'
    // })
    // setTimeout(function() {
    //   loadingInstance.close()
    // }, 2000);
    
    // console.log(this.$refs)
  }
}
</script>

<style lang="scss" scoped="scoped">
@import './../assets/styles/css.scss';
.netchart {
  position: relative;
}
.netchart .nodata {
  display:inline-block;
  position: absolute;
  margin: 0;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  transform: translateY(-50%);
}
#process >>> .el-divider__text {
  font-size: 0.22rem;
}
#process >>> .el-divider {
  background-color: #9c9d9e;
}
#process >>> .el-tabs__item {
  font-size: 0.22rem;
  font-weight: 800;
}
#process >>> .el-radio.is-bordered {
  border-color: #a9adb5;
}
#process >>> .el-radio.is-bordered.is-checked {
  background: #e7eff7;
  border-color: #409EFF!important;
}
#process >>> .chart_canvas {
  .my-chart {
    width: 8.5rem!important;
    // width: 11.5rem !important;
    height: 5rem!important;
  }
}
#process >>> .tab3_tab4 {
  .my-chart {
    width:11rem!important;
    margin: 0 auto;
  }
}
#process {
  width: 65%;
  padding: 0.3rem;
  // padding: 0.3rem 0.3rem 0.3rem 2rem;
  position: relative;
  margin: 0.2rem auto;
  background: #FFFFFF;
  ._block {
    display: block;
  }
  ._none {
    display: none;
  }
  .sekuai {
    text-align: right;
    span {
      display: inline-block;
      margin: 0 0.1rem 0 0;
      font-size: 0.12rem;
      b {
        display: inline-block;
        margin-right: 0.02rem;
        width: 0.25rem;
        height: 0.15rem;
        vertical-align: sub;
        border-radius: 0.02rem;
      }
    }
  }
  h3 {
    font-size: 0.18rem;
    font-weight: 800;
  }
  .tab {
    position: absolute;
    left: -2rem;
    >>> .el-tabs__item {
      height: 0.7rem;
      line-height: 0.7rem;
    }
  }
  .techBox {
    margin-top: 0.1rem;
    .infor {
      p {
        padding: 0.1rem 0.3rem;
        font-weight: 600;
        font-size: 0.16rem;
        margin-top: 0.08rem;
        b {
          color: #DD6161;
          font-weight: 900;
        }
      }
      .processDemon {
        padding: 0 0.26rem;
      }
      .flowChart {
        >>> .chart_canvas {
          margin-top: 0.2rem;
          .my-chart {
            margin: 0 auto;
            width: 11rem!important;
            height: 6rem!important;
          }
        }
        >>> .el-scrollbar {
          .chart_canvas {
            .my-chart {
              width: 37rem!important;
              height: 5rem!important;
            }
          }
        }
      }
    }
  }
  .networkBox {
    .gx {
      margin-top: 0.1rem;
      span {
        @include _span
      }
      span.gongxutit {
        margin-right:0;
      }
      span.gongxutit, span.gongxuspan {
        margin-top: 0.12rem;
        padding: 0.05rem 0.2rem;
      }
      span.gongxuspan {
        border:1px solid #ccc;
      }
    }
    .wl {
      .tableChart {
        // margin-bottom:0.6rem;
      }
      .el-divider--horizontal {
        margin-bottom:0.4rem
      }
      span {
        @include _span
      }
      .sekuai {
        text-align: left;
        span {
          margin: 0.2rem 0 0 0;
          font-size: 0.12rem;
        }
      }
      .tableChart {
        overflow: hidden;
        margin-top: 0.2rem;
        padding: 0 0.3rem;
        padding-right:0;
        .netchart {
          float: left;
          border: 1px solid;
          // width:100%;
        }
        .linkTable {
          float: right;
          width: 3.4rem;
          >>> .el-col-6 {
            display: none;
          }
        }
      }
      .linkTable {
        // overflow: hidden;
        // padding: 0 0.3rem;
      }
    }
  }
  .keyParams_linkageEffect {
    .tab3_tab4 {
      >>> .el-col-6 {
        display: none;
      }
    }
  }
}
#liandongtable >>> table thead tr th:not-first-child {
  font-family: '楷体';
  color:red;
}
h4.tit_34 {
  color: #FF5722;
  margin: 0.08rem 0px;
  font-weight: 700;
  margin-left: 0.3rem;
}
</style>
